diff --git a/tools/materialeditor/src/mainwindow.cpp b/tools/materialeditor/src/mainwindow.cpp index c49f35a..7389b3e 100644 --- a/tools/materialeditor/src/mainwindow.cpp +++ b/tools/materialeditor/src/mainwindow.cpp @@ -165,8 +165,12 @@ void MainWindow::saveMaterial(QString path) { } void MainWindow::updateControls() { + const auto trimPath = [](QString path) { + return path.mid(path.lastIndexOf('/') + 1); + }; + if(!currentlyOpenMaterial.isEmpty()) - setWindowTitle("Material Editor - " + currentlyOpenMaterial); + setWindowTitle("Material Editor - " + trimPath(currentlyOpenMaterial)); else setWindowTitle("Material Editor"); @@ -176,7 +180,7 @@ void MainWindow::updateControls() { if(!openedFiles.empty()) { QMenu* recentlyOpenedMenu = new QMenu(); for(auto file : openedFiles) { - QAction* fileAction = new QAction(file); + QAction* fileAction = new QAction(trimPath(file)); connect(fileAction, &QAction::triggered, [this, file] { openMaterial(file); });