From 16c2d4ef22a2928489934833bab06d5ea33bd90e Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Tue, 17 Aug 2021 11:41:46 +0800 Subject: 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. --- doc/classes/TextEdit.xml | 12 ++++++++++++ doc/classes/UndoRedo.xml | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'doc/classes') 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. + + + + Returns [code]true[/code] if a "redo" action is available. + + Returns [code]true[/code] if the user has selected text. + + + + Returns [code]true[/code] if an "undo" action is available. + + 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. - + Returns [code]true[/code] if a "redo" action is available. - + Returns [code]true[/code] if an "undo" action is available. -- cgit v1.2.3