Fix editor viewport activating while dragging a window

This commit is contained in:
2025-04-18 21:44:09 +03:00
parent 018282bc33
commit e6f90898cb
2 changed files with 9 additions and 1 deletions

View File

@@ -32,9 +32,15 @@ namespace FlaxEditor.GUI.Docking
/// The opacity of the dragged window when hint controls are shown.
/// </summary>
public const float DragWindowOpacity = 0.4f;
/// <summary>
/// Returns true if any windows are being dragged.
/// </summary>
public static bool IsDragActive { get; private set; }
private WindowDragHelper(FloatWindowDockPanel toMove, Window dragSourceWindow)
{
IsDragActive = true;
_toMove = toMove;
_toSet = DockState.Float;
var window = toMove.Window.Window;
@@ -72,6 +78,7 @@ namespace FlaxEditor.GUI.Docking
/// </summary>
public void Dispose()
{
IsDragActive = false;
var window = _toMove?.Window?.Window;
// Unbind events