diff --git a/mRemoteV1/UI/Tabs/DockPaneStripNG.cs b/mRemoteV1/UI/Tabs/DockPaneStripNG.cs index 69101cb4..97ca3ec6 100644 --- a/mRemoteV1/UI/Tabs/DockPaneStripNG.cs +++ b/mRemoteV1/UI/Tabs/DockPaneStripNG.cs @@ -1356,16 +1356,17 @@ namespace mRemoteNG.UI.Tabs { if (m.Msg == (int)Msgs.WM_LBUTTONDBLCLK) { - if (Settings.Default.DoubleClickOnTabClosesIt) + // If the option is not set, do nothing. Do not send the message to base. + if (!Settings.Default.DoubleClickOnTabClosesIt) return; + + // Option is set, close the tab, then send to base. + DockPane.CloseActiveContent(); + if (PatchController.EnableMemoryLeakFix == true) { - DockPane.CloseActiveContent(); - if (PatchController.EnableMemoryLeakFix == true) - { - ContentClosed(); - } - return; + ContentClosed(); } + return; } base.WndProc(ref m);