diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT index 398112a0..9b41c788 100644 --- a/CHANGELOG.TXT +++ b/CHANGELOG.TXT @@ -9,6 +9,7 @@ Fixed issue MR-342 - Incorrect view in config pane of new connection after viewing default inheritance Added detection of newer versions of connection files and database schemata. mRemoteNG will now refuse to open them to avoid data loss. Improved appearance and discoverability of the connection search box. + Fixed tabs not closing on double-click when the active tab is a PuTTY connection. Fixed issue MR-340 - Object reference not set to an instance of an object. Fixed issue MR-344 - Move "Always show panel tabs" option diff --git a/mRemoteV1/UI/UI.Window.Connection.vb b/mRemoteV1/UI/UI.Window.Connection.vb index 192117a6..1ad1be90 100644 --- a/mRemoteV1/UI/UI.Window.Connection.vb +++ b/mRemoteV1/UI/UI.Window.Connection.vb @@ -385,6 +385,7 @@ Namespace UI End Sub Private Sub TabController_DoubleClickTab(ByVal sender As Crownwood.Magic.Controls.TabControl, ByVal page As Crownwood.Magic.Controls.TabPage) Handles TabController.DoubleClickTab + _lastMouseUp = 0 If My.Settings.DoubleClickOnTabClosesIt Then Me.CloseConnectionTab() End If @@ -844,6 +845,7 @@ Namespace UI RefreshIC() End Sub + Private _lastMouseUp As Integer = 0 Private Sub TabController_MouseUp(ByVal sender As Object, ByVal e As MouseEventArgs) Handles TabController.MouseUp Debug.Print("TabController_MouseUp()") Debug.Print("_ignoreChangeSelectedTabClick = {0}", _ignoreChangeSelectedTabClick) @@ -859,7 +861,14 @@ Namespace UI Select Case e.Button Case MouseButtons.Left - FocusIC() + Dim currentTicks As Integer = Environment.TickCount + Dim elapsedTicks As Integer = currentTicks - _lastMouseUp + If elapsedTicks > SystemInformation.DoubleClickTime Then + _lastMouseUp = currentTicks + FocusIC() + Else + TabController.OnDoubleClickTab(TabController.SelectedTab) + End If Case MouseButtons.Middle CloseConnectionTab() Case MouseButtons.Right