View Issue Details

IDProjectCategoryView StatusLast Update
0028978LazarusLCLpublic2017-11-21 11:48
ReporterAnton Kavalenka Assigned ToJuha Manninen  
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);
  if HandleAllocated then
    if Value <> nil then
      Value.DropTarget := True;
      TreeView_SelectDropTarget(Handle, nil);}
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
WidgetsetGTK 2
Attached Files


Anton Kavalenka

2015-11-08 14:15

reporter (129,494 bytes)

Anton Kavalenka

2015-12-06 10:39


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

Anton Kavalenka

2015-12-06 10: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 09:46

reporter   ~0104170

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

Juha Manninen

2017-11-18 09:56

developer   ~0104172

Applied, thanks.

Issue History

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