Board index » delphi » TCustomShellTreeView.SetPath bug

TCustomShellTreeView.SetPath bug

The SetPath () code does this:

FUpdating := True;
SetPathFromID(NewPIDL);
..
FUpdating := False;

However in SetPathFromID (), there is this line at the beginning:

if FUpdating or (csLoading in ComponentState)
or if ((SelectedFolder <> nil) and SamePIDL(SelectedFolder.AbsoluteID, ID))
then Exit;

The result is that SetPathFromID () is never executed when called from SetPath,
because fUpdating is set to true. My fix is to comment FUpdating := True in
SetPath (line 2082).

 

Re:TCustomShellTreeView.SetPath bug


Quote
Alex Kaufman wrote:
> The result is that SetPathFromID () is never executed when called from SetPath,
> because fUpdating is set to true. My fix is to comment FUpdating := True in
> SetPath (line 2082).

Thanks for the details. I'm sure this change will break some other
things. I'll take a look at this later this week (hopefully, by Friday).

--
John Kaster, Borland Developer Relations, http://community.borland.com
$1150/$50K: Thanks to my donors!
http://homepages.borland.com/jkaster/tnt/thanks.html
Buy Kylix! http://www.borland.com/kylix * Got source?
http://codecentral.borland.com
The #1 Java IDE: http://www.borland.com/jbuilder

Other Threads