View Issue Details

IDProjectCategoryView StatusLast Update
0028978LazarusLCLpublic2017-11-21 12:48
ReporterAnton Kavalenka Assigned ToJuha Manninen  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Platformi386OSDebian GNU/Linux 
Product Version1.5 (SVN) 
Summary0028978: LCL: TTreeView.DropTarget works only once. Every TTreeNode.DropTarget property set but never cleared.
DescriptionDragging a tree node with default TDragObject sets for every TTreeNode which were dargged over the property DropTarget to True.

Subsequent mouseing over that node brings nothing (it already set as DropTarget).

Seems like problem is here:

procedure TCustomTreeView.SetDropTarget(Value: TTreeNode);
begin
  if HandleAllocated then
    if Value <> nil then
      Value.DropTarget := True;
    {else
      TreeView_SelectDropTarget(Handle, nil);}
end;
Steps To ReproduceRun the attached project start drag the node over another nodes. A panel and the console displays node text (over which we are hovering).
This can be done only once. Try to visit nodes once again.
TagsNo tags attached.
Fixed in Revisionr56431
LazTarget-
WidgetsetGTK 2
Attached Files

Activities

Anton Kavalenka

2015-11-08 15:15

reporter  

tvdrp.zip (129,494 bytes)

Anton Kavalenka

2015-12-06 11:39

reporter  

treeview.diff (402 bytes)   
Index: treeview.inc
===================================================================
--- treeview.inc	(revision 50681)
+++ treeview.inc	(working copy)
@@ -816,7 +816,7 @@
 
 procedure TTreeNode.SetDropTarget(AValue: Boolean);
 begin
-  if AValue=GetDropTarget then exit;
+//  if AValue=GetDropTarget then exit;
   if AValue then begin
     Include(FStates,nsDropHilited);
     if TreeView<>nil then
treeview.diff (402 bytes)   

Anton Kavalenka

2015-12-06 11:43

reporter   ~0087812

Patch provided.

TTreeNode.SetDropTarget should process the flag setting w/o optimization. And remove/set droptarget pointer.

CudaText man

2017-11-18 10:46

reporter   ~0104170

This is OK patch. it fixes this bug.
@Juha,
pls apply?

Juha Manninen

2017-11-18 10:56

developer   ~0104172

Applied, thanks.

Issue History

Date Modified Username Field Change
2015-11-08 15:15 Anton Kavalenka New Issue
2015-11-08 15:15 Anton Kavalenka File Added: tvdrp.zip
2015-12-02 17:44 Mattias Gaertner Assigned To => Mattias Gaertner
2015-12-02 17:44 Mattias Gaertner Status new => assigned
2015-12-06 11:39 Anton Kavalenka File Added: treeview.diff
2015-12-06 11:43 Anton Kavalenka Note Added: 0087812
2017-11-18 10:46 CudaText man Note Added: 0104170
2017-11-18 10:52 Juha Manninen Assigned To Mattias Gaertner => Juha Manninen
2017-11-18 10:56 Juha Manninen Fixed in Revision => r56431
2017-11-18 10:56 Juha Manninen LazTarget => -
2017-11-18 10:56 Juha Manninen Note Added: 0104172
2017-11-18 10:56 Juha Manninen Status assigned => resolved
2017-11-18 10:56 Juha Manninen Resolution open => fixed
2017-11-21 12:48 Anton Kavalenka Status resolved => closed