You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
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.
This commit is contained in:
@@ -405,11 +405,11 @@ String UndoRedo::get_current_action_name() const {
|
||||
return actions[current_action].name;
|
||||
}
|
||||
|
||||
bool UndoRedo::has_undo() {
|
||||
bool UndoRedo::has_undo() const {
|
||||
return current_action >= 0;
|
||||
}
|
||||
|
||||
bool UndoRedo::has_redo() {
|
||||
bool UndoRedo::has_redo() const {
|
||||
return (current_action + 1) < actions.size();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user