Explorar o código

UI: Make sure all dialogs are closed when hiding window

Fixes a crash that could happen where you close the window while the
main window is hiding, and then the app mistakenly thinks that "all
windows are closed" and initiates shutdown while the main window is
still active but hidden.
jp9000 %!s(int64=9) %!d(string=hai) anos
pai
achega
b9b6f70cd5
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      UI/window-basic-main.hpp

+ 2 - 0
UI/window-basic-main.hpp

@@ -366,6 +366,8 @@ private slots:
 		bool showing = isVisible();
 		bool showing = isVisible();
 		if (disableHiding && showing)
 		if (disableHiding && showing)
 			return;
 			return;
+		if (showing)
+			CloseDialogs();
 		SetShowing(!showing);
 		SetShowing(!showing);
 	}
 	}