Author: ilor
Date: Tue Sep  2 13:08:03 2008
New Revision: 29190

URL: http://svn.gna.org/viewcvs/wesnoth?rev=29190&view=rev
Log:
make editor2's quit to desktop always work

Modified:
    trunk/src/game.cpp

Modified: trunk/src/game.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game.cpp?rev=29190&r1=29189&r2=29190&view=diff
==============================================================================
--- trunk/src/game.cpp (original)
+++ trunk/src/game.cpp Tue Sep  2 13:08:03 2008
@@ -1124,9 +1124,7 @@
 {
        if(jump_to_editor_){
                jump_to_editor_ = false;
-               if (start_editor() != editor2::EXIT_QUIT_TO_DESKTOP){
-                       ;
-               }else{
+               if (start_editor() == editor2::EXIT_QUIT_TO_DESKTOP) {
                        return false;
                }
        }
@@ -2063,8 +2061,11 @@
 #ifdef USE_EDITOR2
                } else if(res == gui::START_MAP_EDITOR) {
                        //@todo editor can ask the game to quit completely
-                       game.start_editor();
-                       gui::set_background_dirty();
+                       if (game.start_editor() == 
editor2::EXIT_QUIT_TO_DESKTOP) {
+                               return 0;
+                       } else {
+                               gui::set_background_dirty();
+                       }
                        continue;
 #endif
                }


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to