Prevent undo and redo at points when they might break the program
This commit is contained in:
parent
f606fc6fc1
commit
2de5c90006
21 changed files with 79 additions and 2 deletions
|
|
@ -168,6 +168,10 @@ void BrushTool::gui_toolbox() {
|
|||
t.gui.pop_id();
|
||||
}
|
||||
|
||||
bool BrushTool::prevent_undo_or_redo() {
|
||||
return controls.intermediateItem != nullptr;
|
||||
}
|
||||
|
||||
void BrushTool::commit_stroke() {
|
||||
if(controls.intermediateItem && controls.intermediateItem->collabListInfo.lock()) {
|
||||
if(!controls.intermediateItem->d.points.empty()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue