diff options
author | Jan Mulder <jlmulder@planet.nl> | 2014-03-20 13:56:04 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-03-20 09:53:39 -0700 |
commit | 53b5e82411ca81fa110ffb0f1fc678b3cb4c4927 (patch) | |
tree | 5db4f273ff8b8efce127d4711b03141ebaf5ca73 /main.cpp | |
parent | 2ca6009dfa85d2eedfad633124505719d6a3a9c0 (diff) | |
download | subsurface-53b5e82411ca81fa110ffb0f1fc678b3cb4c4927.tar.gz |
Do not use default dive filename before setting it
Changeset ee2e43f introduced a small bug. The default dive file as set in
the Prefences is not opened, requiring manual opening. This patch
reshuffles a little code, allowing first the preferences being set, and
than using it.
Signed-off-by: Jan Mulder <jlmulder@planet.nl>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -36,17 +36,17 @@ int main(int argc, char **argv) files.push_back(a); } } - if (no_filenames) { - QString defaultFile(prefs.default_filename); - if (!defaultFile.isEmpty()) - files.push_back(QString(prefs.default_filename)); - } setup_system_prefs(); prefs = default_prefs; fill_profile_color(); parse_xml_init(); taglist_init_global(); init_ui(); + if (no_filenames) { + QString defaultFile(prefs.default_filename); + if (!defaultFile.isEmpty()) + files.push_back(QString(prefs.default_filename)); + } MainWindow *m = MainWindow::instance(); m->setLoadedWithFiles(!files.isEmpty() || !importedFiles.isEmpty()); |