Skip to content

Commit

Permalink
Make exported type dictionary New Key Value pair not steal focus
Browse files Browse the repository at this point in the history
  • Loading branch information
Dowsley committed Sep 13, 2024
1 parent a605312 commit a27a194
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion editor/editor_properties_array_dict.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1177,7 +1177,7 @@ void EditorPropertyDictionary::update_property() {

// We need to grab the focus of the property that is being changed, even if the type didn't actually changed.
// Otherwise, focus will stay on the change type button, which is not very user friendly.
if (changing_type_index == slot.index && slot.index != EditorPropertyDictionaryObject::NEW_KEY_INDEX && slot.index != EditorPropertyDictionaryObject::NEW_VALUE_INDEX) {
if (changing_type_index == slot.index && slot.index > -1) {
callable_mp(slot.prop, &EditorProperty::grab_focus).call_deferred(0);
changing_type_index = EditorPropertyDictionaryObject::NOT_CHANGING_TYPE; // Reset to avoid grabbing focus again.
}
Expand Down

0 comments on commit a27a194

Please sign in to comment.