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:
parent
40f4d791f4
commit
03433f6ca9
1 changed files with 5 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue