mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Change logic to not do anything if file not exist.
This commit is contained in:
parent
234156b153
commit
9ca67acc5d
1 changed files with 8 additions and 10 deletions
|
|
@ -80,20 +80,18 @@ namespace Flow.Launcher
|
|||
return;
|
||||
}
|
||||
|
||||
Point mpos = e.GetPosition(null);
|
||||
Vector diff = this.start - mpos;
|
||||
Point mousePosition = e.GetPosition(null);
|
||||
Vector diff = this.start - mousePosition;
|
||||
|
||||
if (Math.Abs(diff.X) < SystemParameters.MinimumHorizontalDragDistance
|
||||
|| Math.Abs(diff.Y) < SystemParameters.MinimumVerticalDragDistance)
|
||||
|| Math.Abs(diff.Y) < SystemParameters.MinimumVerticalDragDistance
|
||||
|| !File.Exists(file))
|
||||
return;
|
||||
|
||||
DataObject data;
|
||||
data = File.Exists(file)
|
||||
? new DataObject(DataFormats.FileDrop, new[]
|
||||
{
|
||||
file
|
||||
})
|
||||
: new DataObject(DataFormats.UnicodeText, file);
|
||||
var data = new DataObject(DataFormats.FileDrop, new[]
|
||||
{
|
||||
file
|
||||
});
|
||||
DragDrop.DoDragDrop((DependencyObject)sender, data, DragDropEffects.Move | DragDropEffects.Copy);
|
||||
e.Handled = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue