From 79ccda38837cccf73b119da8e02867be25c1eef4 Mon Sep 17 00:00:00 2001 From: Chandler Cox Date: Thu, 6 Oct 2022 16:49:35 -0500 Subject: [PATCH] Moved code to on drag enter to minimize calls. --- Source/Engine/UI/GUI/Control.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Source/Engine/UI/GUI/Control.cs b/Source/Engine/UI/GUI/Control.cs index 351e105a8..19b7761cb 100644 --- a/Source/Engine/UI/GUI/Control.cs +++ b/Source/Engine/UI/GUI/Control.cs @@ -948,6 +948,11 @@ namespace FlaxEngine.GUI { // Set flag _isDragOver = true; + // Update tooltip + if (_tooltipUpdate != null) + { + Tooltip.Hide(); + } return DragDropEffect.None; } @@ -960,12 +965,6 @@ namespace FlaxEngine.GUI [NoAnimate] public virtual DragDropEffect OnDragMove(ref Float2 location, DragData data) { - // Update tooltip - if (_tooltipUpdate != null) - { - SetUpdate(ref _tooltipUpdate, null); - Tooltip.Hide(); - } return DragDropEffect.None; }