From 17f085d6a87fcb2ee2588efc3356cf3dc9ddd924 Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Sun, 21 May 2023 13:21:43 -0600 Subject: [PATCH] lightpreview: show filename in titlebar --- lightpreview/mainwindow.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lightpreview/mainwindow.cpp b/lightpreview/mainwindow.cpp index e2ae90eb..a9a7dcb2 100644 --- a/lightpreview/mainwindow.cpp +++ b/lightpreview/mainwindow.cpp @@ -205,10 +205,17 @@ static std::vector ParseArgs(const QLineEdit *line_edit) void MainWindow::loadFileInternal(const QString &file) { + setWindowFilePath(file); + setWindowTitle(QFileInfo(file).fileName() + " - lightpreview"); + + fs::path fs_path = MakeFSPath(file); + + // setWindowTitle() + qDebug() << "loadFileInternal " << file; - auto d = QbspVisLight_Common(MakeFSPath(file), ParseArgs(qbsp_options), ParseArgs(vis_options), - ParseArgs(light_options), vis_checkbox->isChecked()); + auto d = QbspVisLight_Common( + fs_path, ParseArgs(qbsp_options), ParseArgs(vis_options), ParseArgs(light_options), vis_checkbox->isChecked()); const auto &bsp = std::get(d.bsp);