diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-09-26 16:05:54 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-09-26 16:05:54 +0200 |
commit | 81ffbb9eb1cb43832523cc721fb8b35f4ad90066 (patch) | |
tree | b6cc47b024945e1d3a78e56466c64461b8b6df3b | |
parent | a77593361c6792f9a3ba19a16ad9e8cde107b279 (diff) |
gui: don't start if wizard was closedtrackhat-1.2p4
-rw-r--r-- | gui/main.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gui/main.cpp b/gui/main.cpp index 43a8b0c6..a4e81c01 100644 --- a/gui/main.cpp +++ b/gui/main.cpp @@ -65,10 +65,12 @@ int main(int argc, char** argv) QSettings s(OPENTRACK_ORG); if (!s.contains("wizard-run-once")) { - s.setValue("wizard-run-once", true); auto w = std::make_shared<Wizard>(); w->show(); app.exec(); + if (w->result() != QDialog::Accepted) + goto end; + s.setValue("wizard-run-once", true); } } @@ -92,6 +94,7 @@ int main(int argc, char** argv) Dialog().exec(); } +end: // on MSVC crashes in atexit #ifdef _MSC_VER TerminateProcess(GetCurrentProcess(), 0); |