diff options
author | Haoyu Qiu <timothyqiu32@gmail.com> | 2021-08-17 11:41:46 +0800 |
---|---|---|
committer | Haoyu Qiu <timothyqiu32@gmail.com> | 2021-08-17 21:11:10 +0800 |
commit | 16c2d4ef22a2928489934833bab06d5ea33bd90e (patch) | |
tree | fd4bc91870e0684e1fa668eaeed24c55a733e870 /scene/gui/line_edit.h | |
parent | ca6c5cf7e6252558d8791d41b8b757929ac3819c (diff) | |
download | redot-engine-16c2d4ef22a2928489934833bab06d5ea33bd90e.tar.gz |
Improve Undo/Redo menu items
* Make Undo/Redo menu items disabled when clicking it does nothing.
* Context menu of `TextEdit`
* Context menu of `LineEdit`
* Editor's Scene menu
* Script editor's Edit menu and context menu (for Script and Text)
* Make editor undo/redo log messages translatable.
* Mark `UndoRedo`'s `has_{un,re}do()` methods as `const`.
* Expose `TextEdit`'s `has_{un,re}do()` to scripts since `{un,re}do()` are already available.
Diffstat (limited to 'scene/gui/line_edit.h')
-rw-r--r-- | scene/gui/line_edit.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scene/gui/line_edit.h b/scene/gui/line_edit.h index c5c92d60aa..0e9c032e88 100644 --- a/scene/gui/line_edit.h +++ b/scene/gui/line_edit.h @@ -285,6 +285,8 @@ public: void copy_text(); void cut_text(); void paste_text(); + bool has_undo() const; + bool has_redo() const; void undo(); void redo(); |