Gui: fix several regressions caused by PR #12035
* fix hard crash in MainWindow::_updateActions() if no MDI view exists * in MDIView::buildWindowTitle() use the label of the document because this changes when saving it while the name is immutable * fix const correctness in MDIView::buildWindowTitle() * do not set the modified flag of the main window in MDIView::buildWindowTitle() but in the calling instance * move setting the main window title to Application::viewActivated to reduce code duplication * fix missing application name if FreeCADGui is loaded as Python module
This commit is contained in:
@@ -1260,6 +1260,10 @@ void Application::viewActivated(MDIView* pcView)
|
||||
#endif
|
||||
|
||||
signalActivateView(pcView);
|
||||
getMainWindow()->setWindowTitle(pcView->buildWindowTitle());
|
||||
if (auto document = pcView->getGuiDocument()) {
|
||||
getMainWindow()->setWindowModified(document->isModified());
|
||||
}
|
||||
|
||||
// Set the new active document which is taken of the activated view. If, however,
|
||||
// this view is passive we let the currently active document unchanged as we would
|
||||
|
||||
Reference in New Issue
Block a user