From bd8a6f0681b657577142122889596956f79754c9 Mon Sep 17 00:00:00 2001 From: Mo Date: Sun, 7 May 2023 14:33:47 +0800 Subject: [PATCH] keep SETTINGS_LAST_CHECK_PATH on no selected files (#5016) set SETTINGS_LAST_CHECK_PATH only when mCurrentDirectory is not empty. --- gui/mainwindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 7d73e0b3b..666d94ee1 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -684,8 +684,8 @@ QStringList MainWindow::selectFilesToAnalyze(QFileDialog::FileMode mode) formatAndSetTitle(dir); } } - - setPath(SETTINGS_LAST_CHECK_PATH, mCurrentDirectory); + if (!mCurrentDirectory.isEmpty()) + setPath(SETTINGS_LAST_CHECK_PATH, mCurrentDirectory); return selected; }