Fix crash on undoing Tool by @shun-iwasawa
Port from OT Co-Authored-By: shun-iwasawa <shun-iwasawa@users.noreply.github.com>
This commit is contained in:
parent
87c9c11faa
commit
78ba3b3fa5
2 changed files with 11 additions and 0 deletions
|
@ -182,6 +182,8 @@ public:
|
|||
.arg(QString::fromStdWString(m_level->getName()))
|
||||
.arg(QString::number(m_frameId.getNumber()));
|
||||
}
|
||||
|
||||
void onAdd() override;
|
||||
};
|
||||
|
||||
//================================================================================================
|
||||
|
|
|
@ -605,7 +605,16 @@ void ToolUtils::TToolUndo::notifyImageChanged() const {
|
|||
ImageManager::instance()->invalidate(id);
|
||||
}
|
||||
}
|
||||
//------------------------------------------------------------------------------------------
|
||||
|
||||
void ToolUtils::TToolUndo::onAdd() {
|
||||
// clean up the flags after registering undo
|
||||
TTool::m_isLevelCreated = false;
|
||||
TTool::m_isFrameCreated = false;
|
||||
TTool::m_isLevelRenumbererd = false;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------
|
||||
int ToolUtils::TToolUndo::m_idCount = 0;
|
||||
|
||||
//================================================================================================
|
||||
|
|
Loading…
Reference in a new issue