From 46d848b434fd8fb843b1d969baa3fdf798e03994 Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Sun, 14 Jul 2019 08:19:51 +0200 Subject: [PATCH] radiant: make restart notification a question thanks to latched variable mechanism people can chose to not restart immediately --- radiant/preferences.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/radiant/preferences.cpp b/radiant/preferences.cpp index 11d569a2..8e2e0268 100644 --- a/radiant/preferences.cpp +++ b/radiant/preferences.cpp @@ -919,10 +919,15 @@ void PreferencesDialog_showDialog(){ message << ( *i ) << '\n'; } - ui::alert( MainFrame_getWindow(), message.c_str() ); + message << "\nRestart now?"; + + auto ret = ui::alert( MainFrame_getWindow(), message.c_str(), "Restart " RADIANT_NAME "?", ui::alert_type::YESNO, ui::alert_icon::Question ); + g_restart_required.clear(); - Radiant_Restart(); + if ( ret == ui::alert_response::YES ) { + Radiant_Restart(); + } } } } -- 2.39.2