Clear drag preview material on NOTIFICATION_DRAG_END

(cherry picked from commit 6aee6c1fdd)
This commit is contained in:
Robert Yevdokimov 2024-01-12 19:49:20 -05:00 committed by Rémi Verschelde
parent 9af6e04a15
commit cff0ebd603
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -3114,6 +3114,7 @@ void Node3DEditorViewport::_notification(int p_what) {
case NOTIFICATION_DRAG_END: {
// Clear preview material when dropped outside applicable object.
if (spatial_editor->get_preview_material().is_valid() && !is_drag_successful()) {
_reset_preview_material();
_remove_preview_material();
} else {
_remove_preview_node();