mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-11-03 22:51:06 +01:00 
			
		
		
		
	Disabled: items more consistently release active id if the active item got disabled. (#211) (amend 2952525)
				
					
				
			This commit is contained in:
		@@ -3234,6 +3234,9 @@ bool ImGui::ItemHoverable(const ImRect& bb, ImGuiID id)
 | 
			
		||||
    // When disabled we'll return false but still set HoveredId
 | 
			
		||||
    if (g.CurrentItemFlags & ImGuiItemFlags_Disabled)
 | 
			
		||||
    {
 | 
			
		||||
        // Release active id if turning disabled
 | 
			
		||||
        if (g.ActiveId == id)
 | 
			
		||||
            ClearActiveID();
 | 
			
		||||
        g.HoveredIdDisabled = true;
 | 
			
		||||
        return false;
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user