fix a bug where level in xsheet gets replaced when cancelling saving

This commit is contained in:
pojienie 2020-06-15 11:35:35 +00:00
parent 262def1c41
commit bc5b96b132

View file

@ -1531,7 +1531,11 @@ bool IoCmd::saveLevel(const TFilePath &path) {
if (realPath.getType() == "")
realPath = TFilePath(realPath.getWideString() + ::to_wstring(dotts + ext));
saveLevel(realPath, sl, false);
bool ret = saveLevel(realPath, sl, false);
if(!ret){ //save level failed
return false;
}
RecentFiles::instance()->addFilePath(toQString(realPath), RecentFiles::Level);
TApp::instance()