Skip to content

Commit

Permalink
Fix unintended showing of visual feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruben2776 committed Mar 20, 2023
1 parent eb2b4cd commit fe9fae0
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion PicView/UILogic/DragAndDrop/DragToExplorer.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using PicView.ChangeTitlebar;
using PicView.Editing;
using PicView.FileHandling;
using PicView.PicGallery;
using PicView.Properties;
Expand Down Expand Up @@ -29,6 +30,8 @@ internal static void DragFile(object sender, MouseButtonEventArgs e)
|| Settings.Default.Fullscreen
|| Scroll.IsAutoScrolling
|| ZoomLogic.IsZoomed
|| UC.GetQuickResize is not null && UC.GetQuickResize.Opacity > 0
|| UC.UserControls_Open()
|| ConfigureWindows.MainContextMenu.IsVisible)
{
return;
Expand All @@ -40,6 +43,12 @@ internal static void DragFile(object sender, MouseButtonEventArgs e)
return;
}

if (Color_Picking.IsRunning)
{
Color_Picking.StopRunning(false);
return;
}

if (UC.GetCropppingTool is { IsVisible: true }) return;

string? file;
Expand Down Expand Up @@ -92,7 +101,7 @@ internal static void DragFile(object sender, MouseButtonEventArgs e)

private static void DragContrinueHandler(object sender, QueryContinueDragEventArgs e)
{
if (e.Action == DragAction.Continue && e.KeyStates != DragDropKeyStates.LeftMouseButton)
if (Color_Picking.IsRunning || e.Action == DragAction.Continue && e.KeyStates != DragDropKeyStates.LeftMouseButton)
{
dragdropWindow?.Hide();
return;
Expand Down

0 comments on commit fe9fae0

Please sign in to comment.