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 /doc/classes | |
parent | ca6c5cf7e6252558d8791d41b8b757929ac3819c (diff) |
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 'doc/classes')
-rw-r--r-- | doc/classes/TextEdit.xml | 12 | ||||
-rw-r--r-- | doc/classes/UndoRedo.xml | 4 |
2 files changed, 14 insertions, 2 deletions
diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index 68d20e41d0..7aa627b7d0 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -464,12 +464,24 @@ Returns if the user has IME text. </description> </method> + <method name="has_redo" qualifiers="const"> + <return type="bool" /> + <description> + Returns [code]true[/code] if a "redo" action is available. + </description> + </method> <method name="has_selection" qualifiers="const"> <return type="bool" /> <description> Returns [code]true[/code] if the user has selected text. </description> </method> + <method name="has_undo" qualifiers="const"> + <return type="bool" /> + <description> + Returns [code]true[/code] if an "undo" action is available. + </description> + </method> <method name="insert_line_at"> <return type="void" /> <argument index="0" name="line" type="int" /> diff --git a/doc/classes/UndoRedo.xml b/doc/classes/UndoRedo.xml index 4417447891..def6fe5d1f 100644 --- a/doc/classes/UndoRedo.xml +++ b/doc/classes/UndoRedo.xml @@ -166,13 +166,13 @@ This is useful mostly to check if something changed from a saved version. </description> </method> - <method name="has_redo"> + <method name="has_redo" qualifiers="const"> <return type="bool" /> <description> Returns [code]true[/code] if a "redo" action is available. </description> </method> - <method name="has_undo"> + <method name="has_undo" qualifiers="const"> <return type="bool" /> <description> Returns [code]true[/code] if an "undo" action is available. |