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

@ -19,6 +19,8 @@ class TextBoxTool {
void commit_edit_updates(const std::shared_ptr<DrawTextBox>& a, std::any& prevData);
bool edit_update(const std::shared_ptr<DrawTextBox>& a);
bool edit_gui(const std::shared_ptr<DrawTextBox>& a);
bool prevent_undo_or_redo();
private:
void edit_text(std::function<void()> toRun, const std::shared_ptr<DrawTextBox>& textBox);
void update_textbox_network(const std::shared_ptr<DrawTextBox>& textBox);