TShellTreeView: Display of expand signs (r47650) should be consitent with property ObjectTypes
Original Reporter info from Mantis: ruewa
-
Reporter name:
Original Reporter info from Mantis: ruewa
- Reporter name:
Description:
-
r47650 works only for ObjectTypes = [otFolders]. If hidden directories should be displayed also, it does not work. My patch would synchronize the expand signs with the ObjectTypes settings by replacing the local function HasSubDir by a function called HasDisplayableChild.
-
If ObjectTypes <> [otFolders] the initial display ignores the ObjectTypes settings, because the tree is built up before reading those settings and the property assignment goes directly to the field, without refreshing. Therefore a SetObjectTypes method should be added in order to refresh the tree on initiation and changes.
-
The meaning of the otHidden setting depends on the setting of otFolders and otNonFolders: E.g. if otFolders is set, otHidden will show hidden directories. To show hidden Files, otNonFolders must be set together with otHidden. This behaviour should be mentioned in the documentation of TShellTreeView.ObjectTypes.
Steps to reproduce:
See the attached test program, which includes the changed ShellCtrls.pas.
Additional information:
Related to 0027415 / r47650
Mantis conversion info:
- Mantis ID: 27439
- Version: 1.3 (SVN)