Permalink
Browse files

Fix tabs not closing on double-click when the active tab is a PuTTY c…

…onnection.

(cherry picked from commit 960ecba)

Conflicts:
	CHANGELOG.TXT
  • Loading branch information...
1 parent d2459de commit b735e6d3e453beb7cb490fb8e3bc022bafec8874 @rmcardle rmcardle committed Feb 27, 2013
Showing with 11 additions and 1 deletion.
  1. +1 −0 CHANGELOG.TXT
  2. +10 −1 mRemoteV1/UI/UI.Window.Connection.vb
View
@@ -1,5 +1,6 @@
Fixed issue MR-340 - Object reference not set to an instance of an object.
Fixed issue MR-344 - Move "Always show panel tabs" option
+ Fixed tabs not closing on double-click when the active tab is a PuTTY connection.
1.70 (2013-02-25):
Fixed issue MR-332 - Can't select different tab with one click after disconnecting existing tab
@@ -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

0 comments on commit b735e6d

Please sign in to comment.