Fix crash in Tree::_get_item_focus_rect
This commit is contained in:
+5
-2
@@ -5160,7 +5160,10 @@ void Tree::_notification(int p_what) {
|
||||
} break;
|
||||
|
||||
case NOTIFICATION_VISIBILITY_CHANGED: {
|
||||
drag_touching = false;
|
||||
if (!is_visible()) {
|
||||
drag_touching = false;
|
||||
popup_editor->hide();
|
||||
}
|
||||
} break;
|
||||
|
||||
case NOTIFICATION_DRAG_END: {
|
||||
@@ -5642,7 +5645,7 @@ void Tree::_notification(int p_what) {
|
||||
|
||||
case NOTIFICATION_RESIZED:
|
||||
case NOTIFICATION_TRANSFORM_CHANGED: {
|
||||
if (popup_edited_item != nullptr) {
|
||||
if (popup_edited_item != nullptr && popup_editor->is_visible()) {
|
||||
Rect2 rect = _get_item_focus_rect(popup_edited_item);
|
||||
|
||||
popup_editor->set_position(get_screen_position() + rect.position);
|
||||
|
||||
Reference in New Issue
Block a user