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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user