Fix bug in MainWindow::setActiveWindow

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.
This commit is contained in:
wmayer
2019-08-23 23:44:19 +02:00
parent 6dae8f3717
commit c4e34ed9be

View File

@@ -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);