diff --git a/app/src/gambas3/.src/FMain.class b/app/src/gambas3/.src/FMain.class index 83e6a5b7c..8466bcf18 100644 --- a/app/src/gambas3/.src/FMain.class +++ b/app/src/gambas3/.src/FMain.class @@ -1719,22 +1719,27 @@ End Public Sub tvwProject_DragMove() + 'Debug Drag.X;; Drag.Y;; Drag.Action + If Not tvwProject.FindAt(Drag.X, Drag.Y) Then $sKey = tvwProject.Item.Key If Project.IsLocked($sKey) Then Goto STOP_EVENT + If Drag.Format = MMime.DATA And If Drag.Source Then If Not IsDataKey($sKey) Then Goto STOP_EVENT Else If Drag.Format = MMime.CLASS And If Drag.Source Then If $sKey <> Project.KEY_SOURCE Then If Not Project.IsSourcePath($sKey, True) Then Goto STOP_EVENT Endif + If Drag.Action <> Drag.Move Then Goto STOP_EVENT Else If Drag.Format = MMime.URI Then If Not IsDataKey($sKey) Then Goto STOP_EVENT Else Goto STOP_EVENT Endif + With tvwProject[$sKey] If .Children Then If Not timOpen.Enabled Or $sKey <> $sKeyDrag Then @@ -1794,7 +1799,7 @@ Public Sub tvwProject_Drop() Dim aFile As String[] Dim sSrc As String = Drag.Data - 'Debug Drag.Format;; Drag.Data + 'Debug Drag.Action;; Drag.Format;; Drag.Data ' $hProjectTree.FillDir($sKey) @@ -1829,6 +1834,8 @@ Public Sub tvwProject_MouseDrag() Dim sKey As String + 'Debug Mouse.StartX;; Mouse.StartY + If Not Mouse.Left Then Return If tvwProject.FindAt(Mouse.StartX, Mouse.StartY) Then Return @@ -2133,6 +2140,8 @@ End Public Sub tvwProject_Drag() + 'Debug + End Public Sub mnuStatusBar_Click() diff --git a/app/src/gambas3/.src/Project.module b/app/src/gambas3/.src/Project.module index e7942e17e..4337447a3 100644 --- a/app/src/gambas3/.src/Project.module +++ b/app/src/gambas3/.src/Project.module @@ -5289,7 +5289,7 @@ Public Sub MoveFile(sSrc As String, sDst As String, Optional bOther As Boolean) Catch - FMain.ShowError(Subst(("Cannot move file &1."), File.Name(sSrc)) & "\n\n" & Error.Text & "\n" & Error.Backtrace.Join(" ") & "", sSrc) + FMain.ShowErrorWith(Subst(("Cannot move file &1."), File.Name(sSrc))) End