From bc5b96b1321ed8c182e0aa8e186180757c8b1c51 Mon Sep 17 00:00:00 2001 From: pojienie Date: Jun 15 2020 11:35:35 +0000 Subject: 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()