OpenToonz - An open-source full-featured 2D animation creation software
C
Changed undo to only be used if a tool is not being used instead of deactivating tools while an undo is being used.
Dennis Lam6dfd0cbf70e1
diff --git a/toonz/sources/toonz/mainwindow.cpp b/toonz/sources/toonz/mainwindow.cppindex 102c1d43e..eba757cc3 100644--- a/toonz/sources/toonz/mainwindow.cpp+++ b/toonz/sources/toonz/mainwindow.cpp@@ -936,13 +936,11 @@ Room *MainWindow::getCurrentRoom() const {void MainWindow::onUndo() {ToolHandle *toolH = TApp::instance()->getCurrentTool();- // end tool use to avoid applying tool on removed layer on undo- if (toolH->isToolBusy()) {- toolH->getTool()->onDeactivate();+ // do not use undo if tool is currently in use+ if (!toolH->isToolBusy()) {+ bool ret = TUndoManager::manager()->undo();+ if (!ret) DVGui::error(QObject::tr("No more Undo operations available."));}-- bool ret = TUndoManager::manager()->undo();- if (!ret) DVGui::error(QObject::tr("No more Undo operations available."));}//-----------------------------------------------------------------------------