From 81ffbb9eb1cb43832523cc721fb8b35f4ad90066 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 26 Sep 2016 16:05:54 +0200 Subject: gui: don't start if wizard was closed --- gui/main.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gui/main.cpp') 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(); 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); -- cgit v1.2.3