Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
- Handle tabbed dock widgets while switching between perspectives.

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@25503 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adeas31 committed Apr 11, 2015
1 parent 2aabc0e commit 6385b63
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions OMEdit/OMEditGUI/MainWindow.cpp
Expand Up @@ -2419,6 +2419,11 @@ void MainWindow::switchToModelingPerspective()
mpModelWidgetContainer->currentModelWidgetChanged(mpModelWidgetContainer->getCurrentMdiSubWindow());
mpVariablesDockWidget->hide();
mpPlotToolBar->setEnabled(false);
// In case user has tabbed the dock widgets then make LibraryTreeWidget active.
QList<QDockWidget*> tabifiedDockWidgetsList = tabifiedDockWidgets(mpLibraryTreeDockWidget);
if (tabifiedDockWidgetsList.size() > 0) {
tabifyDockWidget(tabifiedDockWidgetsList.at(0), mpLibraryTreeDockWidget);
}
}

void MainWindow::switchToPlottingPerspective()
Expand All @@ -2443,6 +2448,11 @@ void MainWindow::switchToPlottingPerspective()
}
mpVariablesDockWidget->show();
mpPlotToolBar->setEnabled(true);
// In case user has tabbed the dock widgets then make VariablesWidget active.
QList<QDockWidget*> tabifiedDockWidgetsList = tabifiedDockWidgets(mpVariablesDockWidget);
if (tabifiedDockWidgetsList.size() > 0) {
tabifyDockWidget(tabifiedDockWidgetsList.at(0), mpVariablesDockWidget);
}
}

/*!
Expand Down

0 comments on commit 6385b63

Please sign in to comment.