]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/preferences.cpp
radiant: make restart notification a question
[xonotic/netradiant.git] / radiant / preferences.cpp
index 11d569a20ff364b3b563e1a46e76f70cd8931e0f..8e2e0268f8ec882132528af56cc110fffcecc330 100644 (file)
@@ -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();
+                       }
                }
        }
 }