mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-10-31 13:11:05 +01:00 
			
		
		
		
	Window: Fixed a bug with child window inheriting ItemFlags from their parent when the child window also manipulate the ItemFlags stack. (#3024) [@Stanbroek]
Amendf843facba4and8828889d5e
This commit is contained in:
		| @@ -44,6 +44,8 @@ Other Changes: | |||||||
|   when the menu is not open. (#3030) |   when the menu is not open. (#3030) | ||||||
| - InputText: Fixed password fields displaying ASCII spaces as blanks instead of using the '*' | - InputText: Fixed password fields displaying ASCII spaces as blanks instead of using the '*' | ||||||
|   glyph. (#2149, #515) |   glyph. (#2149, #515) | ||||||
|  | - Window: Fixed a bug with child window inheriting ItemFlags from their parent when the child | ||||||
|  |   window also manipulate the ItemFlags stack. (#3024) [@Stanbroek] | ||||||
| - Font: Fixed non-ASCII space occasionally creating unnecessary empty polygons. | - Font: Fixed non-ASCII space occasionally creating unnecessary empty polygons. | ||||||
| - Demo: Added a black and white gradient to Demo>Examples>Custom Rendering. | - Demo: Added a black and white gradient to Demo>Examples>Custom Rendering. | ||||||
| - Backends: Win32: Added ImGui_ImplWin32_EnableDpiAwareness(), ImGui_ImplWin32_GetDpiScaleForHwnd(), | - Backends: Win32: Added ImGui_ImplWin32_EnableDpiAwareness(), ImGui_ImplWin32_GetDpiScaleForHwnd(), | ||||||
|   | |||||||
| @@ -5844,19 +5844,15 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags) | |||||||
|         window->DC.ParentLayoutType = parent_window ? parent_window->DC.LayoutType : ImGuiLayoutType_Vertical; |         window->DC.ParentLayoutType = parent_window ? parent_window->DC.LayoutType : ImGuiLayoutType_Vertical; | ||||||
|         window->DC.FocusCounterRegular = window->DC.FocusCounterTabStop = -1; |         window->DC.FocusCounterRegular = window->DC.FocusCounterTabStop = -1; | ||||||
|  |  | ||||||
|         window->DC.ItemFlags = parent_window ? parent_window->DC.ItemFlags : ImGuiItemFlags_Default_; |  | ||||||
|         window->DC.ItemWidth = window->ItemWidthDefault; |         window->DC.ItemWidth = window->ItemWidthDefault; | ||||||
|         window->DC.TextWrapPos = -1.0f; // disabled |         window->DC.TextWrapPos = -1.0f; // disabled | ||||||
|         window->DC.ItemFlagsStack.resize(0); |         window->DC.ItemFlagsStack.resize(0); | ||||||
|         window->DC.ItemWidthStack.resize(0); |         window->DC.ItemWidthStack.resize(0); | ||||||
|         window->DC.TextWrapPosStack.resize(0); |         window->DC.TextWrapPosStack.resize(0); | ||||||
|         window->DC.GroupStack.resize(0); |         window->DC.GroupStack.resize(0); | ||||||
|  |         window->DC.ItemFlags = parent_window ? parent_window->DC.ItemFlags : ImGuiItemFlags_Default_; | ||||||
|         if ((flags & ImGuiWindowFlags_ChildWindow) && (window->DC.ItemFlags != parent_window->DC.ItemFlags)) |         if (parent_window) | ||||||
|         { |  | ||||||
|             window->DC.ItemFlags = parent_window->DC.ItemFlags; |  | ||||||
|             window->DC.ItemFlagsStack.push_back(window->DC.ItemFlags); |             window->DC.ItemFlagsStack.push_back(window->DC.ItemFlags); | ||||||
|         } |  | ||||||
|  |  | ||||||
|         if (window->AutoFitFramesX > 0) |         if (window->AutoFitFramesX > 0) | ||||||
|             window->AutoFitFramesX--; |             window->AutoFitFramesX--; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user