diff --git a/mRemoteV1/UI/Window/ConnectionWindow.cs b/mRemoteV1/UI/Window/ConnectionWindow.cs index 590875c30..a510fdd98 100644 --- a/mRemoteV1/UI/Window/ConnectionWindow.cs +++ b/mRemoteV1/UI/Window/ConnectionWindow.cs @@ -43,6 +43,8 @@ namespace mRemoteNG.UI.Window TabText = formText; connDock.DocumentStyle = DocumentStyle.DockingWindow; connDock.ShowDocumentIcon = true; + + connDock.ActiveContentChanged += ConnDockOnActiveContentChanged; } private InterfaceControl GetInterfaceControl() @@ -305,6 +307,15 @@ namespace mRemoteNG.UI.Window } #endregion + #region Events + private void ConnDockOnActiveContentChanged(object sender, EventArgs e) + { + var ic = GetInterfaceControl(); + if (ic?.Info == null) return; + FrmMain.Default.SelectedConnection = ic.Info; + } + #endregion + #region Tab Menu private void ShowHideMenuButtons(object sender, CancelEventArgs e) {