Prevent undo and redo at points when they might break the program

This commit is contained in:
Yousef Khadadeh 2025-07-27 16:53:22 +03:00
parent f606fc6fc1
commit 2de5c90006
21 changed files with 79 additions and 2 deletions

View file

@ -139,6 +139,10 @@ void EllipseDrawTool::tool_update() {
}
}
bool EllipseDrawTool::prevent_undo_or_redo() {
return controls.intermediateItem != nullptr;
}
void EllipseDrawTool::commit() {
if(controls.intermediateItem && controls.intermediateItem->collabListInfo.lock()) {
controls.intermediateItem->client_send_update_final(drawP);