mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
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>
This commit is contained in:
parent
2ca6009dfa
commit
53b5e82411
1 changed files with 5 additions and 5 deletions
10
main.cpp
10
main.cpp
|
@ -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());
|
||||
|
|
Loading…
Reference in a new issue