diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-11-05 10:05:22 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-11-05 13:45:50 -0800 |
commit | 081295cb406f5284b8aae3ef0dcbcdad01241179 (patch) | |
tree | b19a0fae132c52ea8e8c9d95c98287c638e73476 /profile-widget | |
parent | 533d724d1b4380741ce7db91c39262df6c0df062 (diff) | |
download | subsurface-081295cb406f5284b8aae3ef0dcbcdad01241179.tar.gz |
Untangle Profile from MainWindow: files on command line
There's no reason why this should be on the MainWindow widget.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'profile-widget')
-rw-r--r-- | profile-widget/profilewidget2.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp index a7105b8ca..6177f5b97 100644 --- a/profile-widget/profilewidget2.cpp +++ b/profile-widget/profilewidget2.cpp @@ -31,6 +31,9 @@ #include "mainwindow.h" #include "preferences/preferencesdialog.h" +// a couple of helpers we need +extern bool haveFilesOnCommandLine(); + /* This is the global 'Item position' variable. * it should tell you where to position things up * on the canvas. @@ -529,7 +532,7 @@ void ProfileWidget2::plotDive(struct dive *d, bool force) // special handling for the first time we display things int animSpeedBackup = 0; - if (firstCall && MainWindow::instance()->filesFromCommandLine()) { + if (firstCall && haveFilesOnCommandLine()) { animSpeedBackup = prefs.animation_speed; prefs.animation_speed = 0; firstCall = false; @@ -673,7 +676,7 @@ void ProfileWidget2::plotDive(struct dive *d, bool force) if (dcText.isEmpty()) dcText = tr("Unknown dive computer"); diveComputerText->setText(dcText); - if (MainWindow::instance()->filesFromCommandLine() && animSpeedBackup != 0) { + if (haveFilesOnCommandLine() && animSpeedBackup != 0) { prefs.animation_speed = animSpeedBackup; } |