Skip to content

Commit

Permalink
Fix bug in MainWindow::setActiveWindow
Browse files Browse the repository at this point in the history
The method MainWindow::setActiveWindow() must not automatically add a view to the mdi area if it's not part of it because this causes a crash when trying to make a fullscreen window or undock a view.
Instead the calling instance must explicitly call MainWindow::addWindow where needed.
  • Loading branch information
wwmayer committed Aug 23, 2019
1 parent 6dae8f3 commit c4e34ed
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Gui/MainWindow.cpp
Expand Up @@ -997,10 +997,8 @@ void MainWindow::onSetActiveSubWindow(QWidget *window)

void MainWindow::setActiveWindow(MDIView* view)
{
if(!view || d->activeView == view)
if (!view || d->activeView == view)
return;
if(!windows().contains(view->parentWidget()))
addWindow(view);
onSetActiveSubWindow(view->parentWidget());
d->activeView = view;
Application::Instance->viewActivated(view);
Expand Down

0 comments on commit c4e34ed

Please sign in to comment.