Merge pull request #77861 from ajreckof/fix-being-able-to-delete-new-key/value-from-dictionary-editor

Fix being able to delete new key/value from dictionary editor.
This commit is contained in:
Rémi Verschelde 2023-06-09 11:05:36 +02:00
commit 9b31d257ae
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -744,6 +744,7 @@ void EditorPropertyDictionary::_change_type(Object *p_button, int p_index) {
Button *button = Object::cast_to<Button>(p_button);
Rect2 rect = button->get_screen_rect();
change_type->set_item_disabled(change_type->get_item_index(Variant::VARIANT_MAX), p_index < 0);
change_type->reset_size();
change_type->set_position(rect.get_end() - Vector2(change_type->get_contents_minimum_size().x, 0));
change_type->popup();