From 22ad3653a86cb7281fcc7b47937dcbaaebe15801 Mon Sep 17 00:00:00 2001 From: Rodney Date: Jun 15 2020 12:47:32 +0000 Subject: Merge pull request #3355 from pojienie/fix-cancel-save-level-error fix a bug where level in xsheet gets replaced when cancelling saving --- diff --git a/toonz/sources/toonz/iocommand.cpp b/toonz/sources/toonz/iocommand.cpp index 558c55e..057a66d 100644 --- a/toonz/sources/toonz/iocommand.cpp +++ b/toonz/sources/toonz/iocommand.cpp @@ -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()