Re-enable expanding previously expanded folders. Implementation is still not ideal, but it's better

This commit is contained in:
David Sparer
2016-08-23 09:35:08 -06:00
parent a89a593f51
commit 3c69644f21
3 changed files with 12 additions and 12 deletions

View File

@@ -31,7 +31,6 @@ namespace mRemoteNG.Config.Connections
//TODO find way to inject data source info
private string ConnectionFileName = "";
//public TreeNode RootTreeNode { get; set; }
public ConnectionList ConnectionList { get; set; }
public ContainerList ContainerList { get; set; }
@@ -461,15 +460,6 @@ namespace mRemoteNG.Config.Connections
return connectionInfo;
}
private void ExpandPreviouslyOpenedFolders()
{
foreach (ContainerInfo contI in ContainerList)
{
if (contI.IsExpanded)
contI.TreeNode.Expand();
}
}
private bool IsExportFile()
{
var isExportFile = false;

View File

@@ -153,6 +153,7 @@ namespace mRemoteNG.UI.Forms
Windows.treePanel.Focus();
ConnectionTree.TreeView = Windows.treeForm.tvConnections;
Windows.treeForm.ExpandPreviouslyOpenedFolders();
Config.Putty.Sessions.StartWatcher();
if (Settings.Default.StartupComponentsCheck)

View File

@@ -104,10 +104,19 @@ namespace mRemoteNG.UI.Window
{
tvConnections_AfterSelect(tvConnections, new TreeViewEventArgs(tvConnections.SelectedNode, TreeViewAction.ByMouse));
}
public void ExpandPreviouslyOpenedFolders()
{
foreach (ContainerInfo contI in Runtime.ContainerList)
{
if (contI.IsExpanded)
contI.TreeNode.Expand();
}
}
#endregion
#region Public Properties
public ToolTip DescriptionTooltip {get; set;}
public ToolTip DescriptionTooltip {get; set;}
#endregion
#region Private Methods