summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-01-03 12:23:49 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-01-03 12:23:49 +0100
commit1f53579a8f1a6934fd7ccc3c47e9eb6e2fdeb00f (patch)
tree2a3c2ba8f28090a981cfda06615ba57d8d52d6ca
parent4e360ac61264f1e54e14f776c32cc82cde13d76a (diff)
parentfd17f678945087b7e8c9d9aca59fdaf32e1805e6 (diff)
Merge pull request #70742 from Maran23/4-x-batch-rename-substitute-fix
Fix substitute buttons were never enabled
-rw-r--r--editor/rename_dialog.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/rename_dialog.cpp b/editor/rename_dialog.cpp
index 40683e2938..5243916bd2 100644
--- a/editor/rename_dialog.cpp
+++ b/editor/rename_dialog.cpp
@@ -338,7 +338,7 @@ void RenameDialog::_bind_methods() {
}
void RenameDialog::_update_substitute() {
- LineEdit *focus_owner_line_edit = Object::cast_to<LineEdit>(scene_tree_editor->get_viewport()->gui_get_focus_owner());
+ LineEdit *focus_owner_line_edit = Object::cast_to<LineEdit>(get_viewport()->gui_get_focus_owner());
bool is_main_field = _is_main_field(focus_owner_line_edit);
but_insert_name->set_disabled(!is_main_field);
@@ -636,7 +636,7 @@ bool RenameDialog::_is_main_field(LineEdit *line_edit) {
}
void RenameDialog::_insert_text(String text) {
- LineEdit *focus_owner = Object::cast_to<LineEdit>(scene_tree_editor->get_viewport()->gui_get_focus_owner());
+ LineEdit *focus_owner = Object::cast_to<LineEdit>(get_viewport()->gui_get_focus_owner());
if (_is_main_field(focus_owner)) {
focus_owner->selection_delete();