Merge pull request #87135 from ryevdokimov/do-not-apply-material-on-ui-cancel

Clear drag preview material on `NOTIFICATION_DRAG_END`
This commit is contained in:
Rémi Verschelde 2024-08-19 16:04:28 +02:00
commit 80933392f3
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 1 additions and 0 deletions

View File

@ -3119,6 +3119,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();