Author: jhinrichs
Date: Wed Apr 29 21:56:19 2009
New Revision: 35331

URL: http://svn.gna.org/viewcvs/wesnoth?rev=35331&view=rev
Log:
Fixes overwriting for automatic savegames.

Modified:
    trunk/src/savegame.cpp
    trunk/src/savegame.hpp

Modified: trunk/src/savegame.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/savegame.cpp?rev=35331&r1=35330&r2=35331&view=diff
==============================================================================
--- trunk/src/savegame.cpp (original)
+++ trunk/src/savegame.cpp Wed Apr 29 21:56:19 2009
@@ -481,7 +481,7 @@
 
 bool savegame::save_game_interactive(CVideo& video, const std::string& message,
                                                                         
gui::DIALOG_TYPE dialog_type, const bool has_exit_button,
-                                                                        const 
bool ask_for_filename)
+                                                                        bool 
ask_for_filename)
 {
        show_confirmation_ = ask_for_filename;
        create_filename();
@@ -496,8 +496,14 @@
                                exit = true;
                        }
 
-                       if (res == gui2::twindow::OK)
+                       if (res == gui2::twindow::OK){
                                exit = check_overwrite(video);
+
+                               if (!exit){
+                                       ask_for_filename = true;
+                                       show_confirmation_ = true;
+                               }
+                       }
                }
                catch (illegal_filename_exception){
                        exit = false;

Modified: trunk/src/savegame.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/savegame.hpp?rev=35331&r1=35330&r2=35331&view=diff
==============================================================================
--- trunk/src/savegame.hpp (original)
+++ trunk/src/savegame.hpp Wed Apr 29 21:56:19 2009
@@ -150,7 +150,7 @@
                saves. The return value denotes, if the save was successful or 
not. */
        bool save_game_interactive(CVideo& gui, const std::string& message,
                gui::DIALOG_TYPE dialog_type, const bool has_exit_button = 
false,
-               const bool ask_for_filename = true);
+               bool ask_for_filename = true);
 
        const std::string filename() const { return filename_; }
 


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

Reply via email to