display current active document in main window title

This commit is contained in:
Max Wilfinger
2024-02-24 08:43:20 +01:00
committed by Yorik van Havre
parent 87baa154ac
commit bdebed7d17
5 changed files with 140 additions and 104 deletions

View File

@@ -448,4 +448,18 @@ void MDIView::setCurrentViewMode(ViewMode mode)
}
}
QString MDIView::buildWindowTitle()
{
QString windowTitle;
if (Gui::Document* document = getGuiDocument()) {
if (document->isModified()) {
windowTitle = QString::fromUtf8("* ");
}
windowTitle.append(QString::fromUtf8(getAppDocument()->getName()));
}
return windowTitle;
}
#include "moc_MDIView.cpp"