made map editor show 'save as' dialog...

...if they select 'save map' when the map doesn't yet have a filename
associated with it
This commit is contained in:
Dave White 2005-02-19 19:37:36 +00:00
parent 40f4d791f4
commit 03433f6ca9

View file

@ -1005,6 +1005,10 @@ bool map_editor::save_map(const std::string fn, const bool display_confirmation)
std::string filename = fn;
if (filename == "") {
filename = filename_;
if(filename == "") {
edit_save_as();
return true;
}
}
else {
filename_ = filename;
@ -1017,7 +1021,7 @@ bool map_editor::save_map(const std::string fn, const bool display_confirmation)
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);