mirror of https://gitlab.com/basile.b/dexed.git
fix #130 - mini-explorer, on startup selected folder becomes the root, instead of the previous root
This commit is contained in:
parent
bd3625a63f
commit
61c2d132df
|
@ -3,6 +3,7 @@
|
|||
## Bugs fixed
|
||||
|
||||
- Mini-explorer, clearing the filter had for effect to scan the root folder instead of the selected one. (#129)
|
||||
- Mini-explorer, on startup selected folder becomes the root, instead of the previous root. (#130)
|
||||
|
||||
# v3.9.26
|
||||
|
||||
|
|
|
@ -44,6 +44,7 @@ type
|
|||
fSplitter1Position: integer;
|
||||
fSplitter2Position: integer;
|
||||
fLastFolder: string;
|
||||
fRootFolder: string;
|
||||
fDblClick: TExplorerDoubleClick;
|
||||
fContextExpand: boolean;
|
||||
fShowHidden: boolean;
|
||||
|
@ -51,7 +52,8 @@ type
|
|||
published
|
||||
property splitter1Position: integer read fSplitter1Position write fSplitter1Position;
|
||||
property splitter2Position: integer read fSplitter2Position write fSplitter2Position;
|
||||
property lastFolder: string read fLastFolder write fLastFolder;
|
||||
property lastFolder: string read fLastFolder;
|
||||
property rootFolder: string read fRootFolder write fRootFolder;
|
||||
property favoriteFolders: TStringList read fFavoriteFolders write setFavoriteFolders;
|
||||
property doubleClick: TExplorerDoubleClick read fDblClick write fDblClick;
|
||||
property contextExpand: boolean read fContextExpand write fContextExpand;
|
||||
|
@ -109,6 +111,7 @@ type
|
|||
fFreeProj: ICommonProject;
|
||||
fFavorites: TStringList;
|
||||
fLastFold: string;
|
||||
fRootFold: string;
|
||||
fLastListOrTree: TControl;
|
||||
fDblClick: TExplorerDoubleClick;
|
||||
fContextExpand: boolean;
|
||||
|
@ -237,6 +240,7 @@ begin
|
|||
widg := TMiniExplorerWidget(source);
|
||||
fFavoriteFolders.Assign(widg.fFavorites);
|
||||
fLastFolder := widg.fLastFold;
|
||||
fRootFolder := widg.fRootFold;
|
||||
fSplitter1Position := widg.Splitter1.GetSplitterPosition;
|
||||
fSplitter2Position := widg.Splitter2.GetSplitterPosition;
|
||||
fDblClick:= widg.fDblClick;
|
||||
|
@ -272,7 +276,9 @@ begin
|
|||
widg.treeFolders.ObjectTypes := widg.treeFolders.ObjectTypes - [otHidden];
|
||||
widg.lstFiles.ObjectTypes := widg.lstFiles.ObjectTypes -[otHidden];
|
||||
end;
|
||||
if widg.fLastFold.dirExists then
|
||||
if fRootFolder.isNotEmpty and fRootFolder.dirExists then
|
||||
widg.browse(fRootFolder)
|
||||
else if fLastFolder.isNotEmpty and fLastFolder.dirExists then
|
||||
widg.browse(fLastFolder);
|
||||
end
|
||||
else inherited;
|
||||
|
@ -814,6 +820,7 @@ begin
|
|||
if treeFolders.Selected.isNotAssigned then
|
||||
exit;
|
||||
fLastFold := treeFolders.Path.extractFileDir; // trailing path sep
|
||||
fRootFold := treeFolders.Root;
|
||||
subjMnexDirectoryChanged(fMnxSubj, fLastFold);
|
||||
lstFiles.Sort();
|
||||
end;
|
||||
|
|
Loading…
Reference in New Issue