diff --git a/mRemoteV1/Tools/ExternalTool.cs b/mRemoteV1/Tools/ExternalTool.cs index b0ab89f86..6dd244507 100644 --- a/mRemoteV1/Tools/ExternalTool.cs +++ b/mRemoteV1/Tools/ExternalTool.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; @@ -7,6 +7,7 @@ using System.IO; using mRemoteNG.App; using mRemoteNG.Connection; using mRemoteNG.Connection.Protocol; +using mRemoteNG.Container; using mRemoteNG.Messages; // ReSharper disable ArrangeAccessorOwnerBody @@ -126,6 +127,11 @@ namespace mRemoteNG.Tools } ConnectionInfo = startConnectionInfo; + if (ConnectionInfo.IsContainer) + { + (ConnectionInfo as ContainerInfo).Children.ForEach(child => Start(child)); + return; + } if (TryIntegrate) StartIntegrated(); diff --git a/mRemoteV1/UI/Controls/ConnectionContextMenu.cs b/mRemoteV1/UI/Controls/ConnectionContextMenu.cs index 2b234cdb8..e8a6c4bd0 100644 --- a/mRemoteV1/UI/Controls/ConnectionContextMenu.cs +++ b/mRemoteV1/UI/Controls/ConnectionContextMenu.cs @@ -835,12 +835,9 @@ namespace mRemoteNG.UI.Controls { try { - if (_connectionTree.SelectedNode.GetTreeNodeType() == TreeNodeType.Container) - (_connectionTree.SelectedNode as ContainerInfo).Children.ForEach( - child => externalTool.Start(child)); - - else if (_connectionTree.SelectedNode.GetTreeNodeType() == TreeNodeType.Connection | - _connectionTree.SelectedNode.GetTreeNodeType() == TreeNodeType.PuttySession) + if (_connectionTree.SelectedNode.GetTreeNodeType() == TreeNodeType.Connection | + _connectionTree.SelectedNode.GetTreeNodeType() == TreeNodeType.PuttySession | + _connectionTree.SelectedNode.GetTreeNodeType() == TreeNodeType.Container) externalTool.Start(_connectionTree.SelectedNode); } catch (Exception ex)