mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-11-04 07:01:04 +01:00 
			
		
		
		
	Settings: Fixed an issue marking settings as dirty when merely clicking on a border or resize grip without moving it.
This commit is contained in:
		
							
								
								
									
										12
									
								
								imgui.cpp
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								imgui.cpp
									
									
									
									
									
								
							@@ -6050,15 +6050,17 @@ static int ImGui::UpdateWindowManualResize(ImGuiWindow* window, const ImVec2& si
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // Apply back modified position/size to window
 | 
			
		||||
    if (size_target.x != FLT_MAX)
 | 
			
		||||
    const ImVec2 curr_pos = window->Pos;
 | 
			
		||||
    const ImVec2 curr_size = window->SizeFull;
 | 
			
		||||
    if (size_target.x != FLT_MAX && (window->Size.x != size_target.x || window->SizeFull.x != size_target.x))
 | 
			
		||||
        window->Size.x = window->SizeFull.x = size_target.x;
 | 
			
		||||
    if (size_target.y != FLT_MAX)
 | 
			
		||||
    if (size_target.y != FLT_MAX && (window->Size.y != size_target.y || window->SizeFull.y != size_target.y))
 | 
			
		||||
        window->Size.y = window->SizeFull.y = size_target.y;
 | 
			
		||||
    if (pos_target.x != FLT_MAX)
 | 
			
		||||
    if (pos_target.x != FLT_MAX && window->Pos.x != ImTrunc(pos_target.x))
 | 
			
		||||
        window->Pos.x = ImTrunc(pos_target.x);
 | 
			
		||||
    if (pos_target.y != FLT_MAX)
 | 
			
		||||
    if (pos_target.y != FLT_MAX && window->Pos.y != ImTrunc(pos_target.y))
 | 
			
		||||
        window->Pos.y = ImTrunc(pos_target.y);
 | 
			
		||||
    if (size_target.x != FLT_MAX || size_target.y != FLT_MAX || pos_target.x != FLT_MAX || pos_target.y != FLT_MAX)
 | 
			
		||||
    if (curr_pos.x != window->Pos.x || curr_pos.y != window->Pos.y || curr_size.x != window->SizeFull.x || curr_size.y != window->SizeFull.y)
 | 
			
		||||
        MarkIniSettingsDirty(window);
 | 
			
		||||
 | 
			
		||||
    // Recalculate next expected border expected coordinates
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user