mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-28 10:02:14 +00:00
UPD: selected filenames history is preserved across restarts (issue: last selected filename becomes saved but doesn't yet become restored)
This commit is contained in:
parent
9b0a2df9da
commit
829cb00b48
1 changed files with 12 additions and 1 deletions
|
|
@ -2268,7 +2268,7 @@ procedure TFileView.LoadConfiguration(AConfig: TXmlConfig; ANode: TXmlNode);
|
|||
var
|
||||
HistoryNode, EntryNode, FSNode, PathsNode: TXmlNode;
|
||||
SortingsNode, SortingSubNode, SortFunctionNode: TXmlNode;
|
||||
sFSType, sPath: String;
|
||||
sFSType, sPath, sFilename: String;
|
||||
aFileSource: IFileSource = nil;
|
||||
ActiveFSIndex: Integer = -1;
|
||||
ActivePathIndex: Integer = -1;
|
||||
|
|
@ -2355,6 +2355,13 @@ begin
|
|||
|
||||
if AConfig.GetAttr(PathsNode, 'Active', False) then
|
||||
ActivePathIndex := FHistory.PathsCount[FHistory.Count - 1] - 1;
|
||||
|
||||
//-- if selected filename is specified in xml file, load it too
|
||||
if AConfig.TryGetAttr(PathsNode, 'Filename', sFilename) then
|
||||
begin
|
||||
FHistory.SetFilenameForCurrentPath(sFilename);
|
||||
end
|
||||
|
||||
end;
|
||||
end;
|
||||
PathsNode := PathsNode.NextSibling;
|
||||
|
|
@ -2481,7 +2488,11 @@ begin
|
|||
AConfig.SetAttr(PathNode, 'Active', True);
|
||||
end;
|
||||
|
||||
//-- set path
|
||||
AConfig.SetContent(PathNode, FHistory.Path[i, j]);
|
||||
|
||||
//-- set selected filename
|
||||
AConfig.SetAttr(PathNode, 'Filename', FHistory.Filename[i, j]);
|
||||
end;
|
||||
end
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue