View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0027571||Lazarus||LCL||public||2015-02-28 22:30||2015-03-01 14:13|
|Reporter||Anton||Assigned To||Bart Broersma|
|Product Version||1.5 (SVN)|
|Summary||0027571: ShellTreeView does not show files in folders without subfolders|
|Description||After r47815 ShellTreeView does not show (in connected ShellListView) files of the deepest folder (that has no subfolders). Due to ugly check (shellctrls.pas:862) it shows files in the parent folder.|
|Steps To Reproduce||New application, shelltreeview + shelllistview (connected), run and select the folder that contains only files in shelltreeview.|
|Tags||No tags attached.|
|Fixed in Revision||r48056, r48063|
Sorry, messed up the logic.
Please test and close if OK.
> Due to ugly check (shellctrls.pas:862)
Would you mind not trying to insult the developers with such remarks in future please?
"Due to probably wrong check (shellctrls.pas:862)" would have been so much nicer ;-)
Anyway: thanks for spotting the error and the exact location.
Thanks, r48056 fixed my particular case but it is not the solution in general.
If ShellTreeView.ObjectTypes contains [otNonFolders] then after trying to expand empty folder when expand sign disappears, connected shellListview begins to display content of parent folder (but should show nothing).
Why DirectoryExistsUTF8(GetPathFromNode(ANode)) cannot be used to determine IsDirectory?
I'll wait before close this issue.
You are right.
I tried to avoid yet another call to the filesystem, but did not notice that HasChildren changes to False in the scenario you described.
Fixed as suggested.
Leaves us with another "problem".
What if folder has been removed in the meantime?
IsDirectory will be false, and as a result it will show parentdirectory.
It should however raise an exception.
At this point in time we cannot know if the selected node in fact was a folder to begin with.
Thank you, Bart!
Deletion of directory is another issue.
As far as I know at least in Windows there tools to monitoring filesystem changes. I have not ever used them so I don't know a lot. Maybe such tools can be used to solve problem with removing folder in the meantime.
|2015-02-28 22:30||Anton||New Issue|
|2015-02-28 23:48||Bart Broersma||Assigned To||=> Bart Broersma|
|2015-02-28 23:48||Bart Broersma||Status||new => assigned|
|2015-03-01 00:02||Bart Broersma||Fixed in Revision||=> r48056|
|2015-03-01 00:02||Bart Broersma||LazTarget||=> 1.4|
|2015-03-01 00:02||Bart Broersma||Note Added: 0081520|
|2015-03-01 00:02||Bart Broersma||Status||assigned => resolved|
|2015-03-01 00:02||Bart Broersma||Resolution||open => fixed|
|2015-03-01 00:02||Bart Broersma||Target Version||=> 1.4|
|2015-03-01 10:58||Bart Broersma||Note Added: 0081528|
|2015-03-01 11:11||Anton||Note Added: 0081529|
|2015-03-01 13:19||Bart Broersma||Fixed in Revision||r48056 => r48056, r48063|
|2015-03-01 13:19||Bart Broersma||Note Added: 0081533|
|2015-03-01 14:13||Anton||Note Added: 0081538|
|2015-03-01 14:13||Anton||Status||resolved => closed|