Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004815 [JEDI VCL] 00 JVCL Components major always 2009-06-08 17:15 2009-10-25 18:17
Reporter ptavasci View Status public  
Assigned To AHUser
Priority normal Resolution fixed  
Status resolved   Product Version 3.00
Summary 0004815: Bug in JvDBTreeView.pas
Description In procedure DragOver, this line

    Accept := (Source = Self) and Assigned(Selected) and

should look like this

    Accept := Accept and (Source = Self) and Assigned(Selected) and

ir order to be fully funcional when drag and dropping.
Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0015630)
AHUser (developer)
2009-06-08 18:28

I don't think so.
If you look at the if-statement above this line then you see that "Accept" would be always False ("if ... and not Accept then").
(0015631)
ptavasci (reporter)
2009-06-08 20:18

You are absolutely right, but... then I think that it should be false, because if I hadn't added that piece of code, then the DragOver would let drop anywhere on the treeview, no matter what value the "Accept" parameter had.

Base class establishes that if there is no DragOver code implemented then "Accept" equals FALSE, otherwise it's TRUE.

Take a look at me code:

procedure TfrmArbolSectores.tvSectoresDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
var
  tnItemDestino: TTreeNode;
begin
  tnItemDestino := (Source as TJvDBTreeView).GetNodeAt(X, Y);
  if Assigned(tnItemDestino) and (tnItemDestino.ImageIndex < 4) and (FNivel > 3) then
    Accept := ModoAgenda and (Source is TJvDBTreeView) and (Sender is TJvDBTreeView) and (tnItemDestino.ImageIndex < 4)
  else
    Accept := False;
end;

Thanks for your support.
(0015632)
ptavasci (reporter)
2009-06-08 20:23

What I mean is that if I intentionally set "Accept" parameter to False for some of the treenodes, then the TJvCustomDBTreeView custom implementation could possibly turn that value into TRUE! And that would not be right.

I hope I can make myself understood, it's been a while since I wrote or spoke in English.

Thanks in advance.

Pablo
(0015733)
ptavasci (reporter)
2009-06-29 22:34

I feel lonely and cold without an answer... :(
(0016171)
obones (administrator)
2009-09-23 17:15

Well, unless Andreas feels otherwise, this will stay as is for the time being
(0016820)
AHUser (developer)
2009-10-25 18:17

Fixed in SVN.

- Issue History
Date Modified Username Field Change
2009-06-08 17:15 ptavasci New Issue
2009-06-08 18:28 AHUser Note Added: 0015630
2009-06-08 18:28 AHUser Status new => feedback
2009-06-08 20:18 ptavasci Note Added: 0015631
2009-06-08 20:23 ptavasci Note Added: 0015632
2009-06-29 22:34 ptavasci Note Added: 0015733
2009-09-23 17:15 obones Note Added: 0016171
2009-10-25 18:17 AHUser Note Added: 0016820
2009-10-25 18:17 AHUser Status feedback => resolved
2009-10-25 18:17 AHUser Fixed in Version => Daily / SVN
2009-10-25 18:17 AHUser Resolution open => fixed
2009-10-25 18:17 AHUser Assigned To => AHUser


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker