Fix tabs not closing on double-click when the active tab is a PuTTY connection.

(cherry picked from commit 960ecba12a)

Conflicts:
	CHANGELOG.TXT
This commit is contained in:
Riley McArdle
2013-02-27 14:15:20 -06:00
parent d2459de700
commit b735e6d3e4
2 changed files with 11 additions and 1 deletions

View File

@@ -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

View File

@@ -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