diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT index 60f02b166..2239cadd2 100644 --- a/CHANGELOG.TXT +++ b/CHANGELOG.TXT @@ -16,6 +16,7 @@ Fix issue MR-99 - Integrate Spanish translation Fix issue MR-101 - Collapse all folders causes a NullReferenceException Fix issue MR-131 - RD Gateway does not respect setting for use different credentials + Fix issue MR-165 - Can't close About window if it is the last tab Fix issue MR-166 - Inheritance button is disabled on some connections Fix issue MR-172 - RDGatewayPassword is unencrypted in confCons.xml file Fix issue MR-176 - Del key while editing connection name triggers 'Delete Connection' diff --git a/mRemoteV1/UI/UI.Window.Base.vb b/mRemoteV1/UI/UI.Window.Base.vb index 1bd336442..7461c00c3 100644 --- a/mRemoteV1/UI/UI.Window.Base.vb +++ b/mRemoteV1/UI/UI.Window.Base.vb @@ -34,6 +34,30 @@ Namespace UI End Sub #End Region +#Region "Private Methods" + Private Sub Base_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load + If TypeOf Me Is Connection Then + frmMain.pnlDock.DocumentStyle = DocumentStyle.DockingSdi + Else + frmMain.pnlDock.DocumentStyle = DocumentStyle.DockingWindow + End If + End Sub + + Private Sub Base_FormClosed(sender As System.Object, e As System.Windows.Forms.FormClosedEventArgs) Handles MyBase.FormClosed + Dim nonConnectionPanelCount As Integer = 0 + For Each document As DockContent In frmMain.pnlDock.Documents + If document IsNot Me And Not TypeOf document Is Connection Then + nonConnectionPanelCount = nonConnectionPanelCount + 1 + End If + Next + + If nonConnectionPanelCount = 0 Then + frmMain.pnlDock.DocumentStyle = DocumentStyle.DockingSdi + Else + frmMain.pnlDock.DocumentStyle = DocumentStyle.DockingWindow + End If + End Sub +#End Region End Class End Namespace End Namespace \ No newline at end of file