Skip to content

Commit

Permalink
Gui: avoid that toolbars of active workbench become invisible
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed May 18, 2022
1 parent 2ecb119 commit ca279e4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Gui/MainWindow.cpp
Expand Up @@ -1176,7 +1176,14 @@ void MainWindow::closeEvent (QCloseEvent * e)

/*emit*/ mainWindowClosed();
d->activityTimer->stop();
saveWindowSettings();

// https://forum.freecadweb.org/viewtopic.php?f=8&t=67748
// When the session manager jumps in it can happen that the closeEvent()
// function is triggered twice and for the second call the main window might be
// invisible. In this case the window settings shouldn't be saved.
if (isVisible())
saveWindowSettings();

delete d->assistant;
d->assistant = nullptr;

Expand Down

0 comments on commit ca279e4

Please sign in to comment.