From fc97ec6be951f38947b6e53da64de5ca4a132af5 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Thu, 18 Feb 2021 15:33:02 +0100 Subject: [PATCH] Common/DocumentResultList: Fix not being able to group columns anymore, because of dragdrop stuff --- .../DocumentResultList/frmDocumentResultList.vb | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/GUIs.Common/DocumentResultList/frmDocumentResultList.vb b/GUIs.Common/DocumentResultList/frmDocumentResultList.vb index cb1b138c..9dd8fb26 100644 --- a/GUIs.Common/DocumentResultList/frmDocumentResultList.vb +++ b/GUIs.Common/DocumentResultList/frmDocumentResultList.vb @@ -788,14 +788,19 @@ Public Class frmDocumentResultList Private Sub GridView1_MouseMove(sender As GridView, e As MouseEventArgs) Handles GridView1.MouseMove If e.Button AndAlso e.Button = MouseButtons.Left Then If _DragBoxFromMouseDown <> Rectangle.Empty And Not _DragBoxFromMouseDown.Contains(e.X, e.Y) Then - If _DocumentInfo IsNot Nothing AndAlso _DocumentInfo.AccessRight > Rights.AccessRight.VIEW_ONLY Then - _ScreenOffset = SystemInformation.WorkingArea.Location - Dim oFullPath As String = _DocumentInfo.FullPath - Dim oFiles As String() = {oFullPath} - Dim oData As New DataObject(DataFormats.FileDrop, oFiles) + Dim oHitInfo = sender.CalcHitInfo(e.Location) - sender.GridControl.DoDragDrop(oData, DragDropEffects.All) + If oHitInfo.InRow Then + If _DocumentInfo IsNot Nothing AndAlso _DocumentInfo.AccessRight > Rights.AccessRight.VIEW_ONLY Then + _ScreenOffset = SystemInformation.WorkingArea.Location + + Dim oFullPath As String = _DocumentInfo.FullPath + Dim oFiles As String() = {oFullPath} + Dim oData As New DataObject(DataFormats.FileDrop, oFiles) + + sender.GridControl.DoDragDrop(oData, DragDropEffects.All) + End If End If End If End If