CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     David White <[EMAIL PROTECTED]> 05/02/19 19:37:36

Modified files:
        src/editor     : editor.cpp 

Log message:
        made map editor show 'save as' dialog if they select 'save map' when 
the map doesn't yet have a filename associated with it

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/editor/editor.cpp.diff?tr1=1.89&tr2=1.90&r1=text&r2=text

Patches:
Index: wesnoth/src/editor/editor.cpp
diff -u wesnoth/src/editor/editor.cpp:1.89 wesnoth/src/editor/editor.cpp:1.90
--- wesnoth/src/editor/editor.cpp:1.89  Thu Jan 27 19:25:52 2005
+++ wesnoth/src/editor/editor.cpp       Sat Feb 19 19:37:36 2005
@@ -1004,7 +1004,11 @@
 bool map_editor::save_map(const std::string fn, const bool 
display_confirmation) {
        std::string filename = fn;
        if (filename == "") {
-               filename = filename_;
+               filename = filename_;
+               if(filename == "") {
+                       edit_save_as();
+                       return true;
+               }
        }
        else {
                filename_ = filename;
@@ -1017,7 +1021,7 @@
                                                         gui::OK_ONLY);
                }
        }
-       catch (io_exception e) {
+       catch (io_exception& e) {
                string_map symbols;
                symbols["msg"] = e.what();
                const std::string msg = vgettext("Could not save the map: 
$msg",symbols);


Reply via email to