mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-11-03 22:51:06 +01:00 
			
		
		
		
	TabBar: Fixed Tab tooltip code making drag and drop tooltip disappear during the frame where the drag payload activate a tab.
This commit is contained in:
		@@ -6779,7 +6779,8 @@ bool    ImGui::TabItemEx(ImGuiTabBar* tab_bar, const char* label, bool* p_open,
 | 
			
		||||
    window->DC.CursorPos = backup_main_cursor_pos;
 | 
			
		||||
 | 
			
		||||
    // Tooltip (FIXME: Won't work over the close button because ItemOverlap systems messes up with HoveredIdTimer)
 | 
			
		||||
    if (g.HoveredId == id && !held && g.HoveredIdNotActiveTimer > 0.50f)
 | 
			
		||||
    // We test IsItemHovered() to discard e.g. when another item is active or drag and drop over the tab bar (which g.HoveredId ignores)
 | 
			
		||||
    if (g.HoveredId == id && !held && g.HoveredIdNotActiveTimer > 0.50f && IsItemHovered())
 | 
			
		||||
        if (!(tab_bar->Flags & ImGuiTabBarFlags_NoTooltip))
 | 
			
		||||
            SetTooltip("%.*s", (int)(FindRenderedTextEnd(label) - label), label);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user