@ -6044,7 +6044,8 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
// Child window can be out of sight and have "negative" clip windows.
// Child window can be out of sight and have "negative" clip windows.
// Mark them as collapsed so commands are skipped earlier (we can't manually collapse them because they have no title bar).
// Mark them as collapsed so commands are skipped earlier (we can't manually collapse them because they have no title bar).
IM_ASSERT ( ( flags & ImGuiWindowFlags_NoTitleBar ) ! = 0 ) ;
IM_ASSERT ( ( flags & ImGuiWindowFlags_NoTitleBar ) ! = 0 ) ;
if ( ! ( flags & ImGuiWindowFlags_AlwaysAutoResize ) & & window - > AutoFitFramesX < = 0 & & window - > AutoFitFramesY < = 0 )
if ( ! ( flags & ImGuiWindowFlags_AlwaysAutoResize ) & & window - > AutoFitFramesX < = 0 & & window - > AutoFitFramesY < = 0 ) // FIXME: Doesn't make sense for ChildWindow??
if ( ! g . LogEnabled )
if ( window - > OuterRectClipped . Min . x > = window - > OuterRectClipped . Max . x | | window - > OuterRectClipped . Min . y > = window - > OuterRectClipped . Max . y )
if ( window - > OuterRectClipped . Min . x > = window - > OuterRectClipped . Max . x | | window - > OuterRectClipped . Min . y > = window - > OuterRectClipped . Max . y )
window - > HiddenFramesCanSkipItems = 1 ;
window - > HiddenFramesCanSkipItems = 1 ;
@ -6930,37 +6931,38 @@ void ImGui::ErrorCheckEndFrameRecover(ImGuiErrorLogCallback log_callback, voi
}
}
# endif
# endif
ImGuiWindow * window = g . CurrentWindow ;
ImGuiWindow * window = g . CurrentWindow ;
IM_ASSERT ( window ! = NULL ) ;
while ( g . CurrentTabBar ! = NULL ) //-V1044
while ( g . CurrentTabBar ! = NULL ) //-V1044
{
{
if ( log_callback ) log_callback ( user_data , " Recovered from missing EndTabBar() in '%s' " , window - > Name ) ;
if ( log_callback ) log_callback ( user_data , " Recovered from missing EndTabBar() in '%s' " , window - > Name ) ;
EndTabBar ( ) ;
EndTabBar ( ) ;
}
}
while ( g. CurrentW indow- > DC . TreeDepth > 0 ) //-V1044
while ( w indow- > DC . TreeDepth > 0 )
{
{
if ( log_callback ) log_callback ( user_data , " Recovered from missing TreePop() in '%s' " , window - > Name ) ;
if ( log_callback ) log_callback ( user_data , " Recovered from missing TreePop() in '%s' " , window - > Name ) ;
TreePop ( ) ;
TreePop ( ) ;
}
}
while ( g . GroupStack . Size > g. CurrentW indow- > DC . StackSizesOnBegin . SizeOfGroupStack ) //-V1044
while ( g . GroupStack . Size > w indow- > DC . StackSizesOnBegin . SizeOfGroupStack )
{
{
if ( log_callback ) log_callback ( user_data , " Recovered from missing EndGroup() in '%s' " , window - > Name ) ;
if ( log_callback ) log_callback ( user_data , " Recovered from missing EndGroup() in '%s' " , window - > Name ) ;
EndGroup ( ) ;
EndGroup ( ) ;
}
}
while ( g. CurrentW indow- > IDStack . Size > 1 ) //-V1044
while ( w indow- > IDStack . Size > 1 )
{
{
if ( log_callback ) log_callback ( user_data , " Recovered from missing PopID() in '%s' " , window - > Name ) ;
if ( log_callback ) log_callback ( user_data , " Recovered from missing PopID() in '%s' " , window - > Name ) ;
PopID ( ) ;
PopID ( ) ;
}
}
while ( g . ColorStack . Size > g. CurrentW indow- > DC . StackSizesOnBegin . SizeOfColorStack ) //-V1044
while ( g . ColorStack . Size > w indow- > DC . StackSizesOnBegin . SizeOfColorStack )
{
{
if ( log_callback ) log_callback ( user_data , " Recovered from missing PopStyleColor() in '%s' for ImGuiCol_%s " , window - > Name , GetStyleColorName ( g . ColorStack . back ( ) . Col ) ) ;
if ( log_callback ) log_callback ( user_data , " Recovered from missing PopStyleColor() in '%s' for ImGuiCol_%s " , window - > Name , GetStyleColorName ( g . ColorStack . back ( ) . Col ) ) ;
PopStyleColor ( ) ;
PopStyleColor ( ) ;
}
}
while ( g . StyleVarStack . Size > g. CurrentW indow- > DC . StackSizesOnBegin . SizeOfStyleVarStack ) //-V1044
while ( g . StyleVarStack . Size > w indow- > DC . StackSizesOnBegin . SizeOfStyleVarStack )
{
{
if ( log_callback ) log_callback ( user_data , " Recovered from missing PopStyleVar() in '%s' " , window - > Name ) ;
if ( log_callback ) log_callback ( user_data , " Recovered from missing PopStyleVar() in '%s' " , window - > Name ) ;
PopStyleVar ( ) ;
PopStyleVar ( ) ;
}
}
while ( g . FocusScopeStack . Size > g. CurrentW indow- > DC . StackSizesOnBegin . SizeOfFocusScopeStack ) //-V1044
while ( g . FocusScopeStack . Size > w indow- > DC . StackSizesOnBegin . SizeOfFocusScopeStack )
{
{
if ( log_callback ) log_callback ( user_data , " Recovered from missing PopFocusScope() in '%s' " , window - > Name ) ;
if ( log_callback ) log_callback ( user_data , " Recovered from missing PopFocusScope() in '%s' " , window - > Name ) ;
PopFocusScope ( ) ;
PopFocusScope ( ) ;
@ -6970,7 +6972,8 @@ void ImGui::ErrorCheckEndFrameRecover(ImGuiErrorLogCallback log_callback, voi
IM_ASSERT ( g . CurrentWindow - > IsFallbackWindow ) ;
IM_ASSERT ( g . CurrentWindow - > IsFallbackWindow ) ;
break ;
break ;
}
}
if ( g . CurrentWindow - > Flags & ImGuiWindowFlags_ChildWindow )
IM_ASSERT ( window = = g . CurrentWindow ) ;
if ( window - > Flags & ImGuiWindowFlags_ChildWindow )
{
{
if ( log_callback ) log_callback ( user_data , " Recovered from missing EndChild() for '%s' " , window - > Name ) ;
if ( log_callback ) log_callback ( user_data , " Recovered from missing EndChild() for '%s' " , window - > Name ) ;
EndChild ( ) ;
EndChild ( ) ;