aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-10-08 07:40:29 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-10-08 07:40:29 +0100
commitf24ab1dfa217e9035c055b0f912e5dcdb0dc941a (patch)
tree0077e5626d2c05135aa705ac85737cc430a23a80
parent37445df0b923f4db904d9d98e89433ddd80d2cc2 (diff)
downloadsubsurface-f24ab1dfa217e9035c055b0f912e5dcdb0dc941a.tar.gz
Refresh the screen even if started with no valid files
If no command line argument is given and no default file is set we didn't call refreshDisplay() and so the information widget stayed enabled even though no dive was shown which looked really weird and was inconsistent with what we showed when the user closed an already open file. This makes the behavior more consistent. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-ui/mainwindow.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 87597606d..084c9f10f 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -1587,9 +1587,10 @@ void MainWindow::importTxtFiles(const QStringList fileNames)
void MainWindow::loadFiles(const QStringList fileNames)
{
bool showWarning = false;
- if (fileNames.isEmpty())
+ if (fileNames.isEmpty()) {
+ refreshDisplay();
return;
-
+ }
QByteArray fileNamePtr;
QStringList failedParses;