From a49bead464557b2be392563454459c71118b4554 Mon Sep 17 00:00:00 2001 From: NCTULouis Date: Tue, 7 Jun 2016 14:24:48 +0800 Subject: [PATCH] Instead of creating a new tab, use current connection to do reconnection When click the reconnect button, the previous version will create a new tab(a new connection) to do reconnection. Instead of doing this, we use the current connection(current tab) to do reconnection. Fix issue #33 --- src/mainframe.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/mainframe.cpp b/src/mainframe.cpp index 4aeea823..95250a3e 100644 --- a/src/mainframe.cpp +++ b/src/mainframe.cpp @@ -1761,10 +1761,7 @@ void CMainFrame::OnReconnect(GtkMenuItem* mitem UNUSED, CMainFrame* _this) CTelnetCon* con = _this->GetCurCon(); if( !con ) return; - if( con->IsClosed() ) - con->Reconnect(); - else - _this->NewCon( con->m_Site.m_Name, con->m_Site.m_URL, &con->m_Site); + con->Reconnect(); } void CMainFrame::FlashWindow( bool flash )