From 54d80b9e90b56cb2117be3997479a01190f7e9aa Mon Sep 17 00:00:00 2001 From: John Wiseman Date: Wed, 12 Apr 2023 15:35:34 +0100 Subject: Version 0.0.0.63 --- AGWCode.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'AGWCode.cpp') diff --git a/AGWCode.cpp b/AGWCode.cpp index 42f5f36..10bed29 100644 --- a/AGWCode.cpp +++ b/AGWCode.cpp @@ -495,6 +495,15 @@ void QtTermTCP::onAGWSocketStateChanged(QAbstractSocket::SocketState socketState AGWUsers->MonSess = nullptr; } + if (TermMode == Single && (singlemodeFormat & Mon)) + { + //Re-renable TCP connects + + for (int i = 0; i < MAXHOSTS; i++) + actHost[i]->setVisible(1); + } + + AGWConnected = 0; } else if (socketState == QAbstractSocket::ConnectedState) @@ -580,7 +589,15 @@ void QtTermTCP::onAGWSocketStateChanged(QAbstractSocket::SocketState socketState else if (TermMode == Single) mythis->setWindowTitle("AGW Monitor Window"); - if (TermMode != Tabbed) // Not ideal, but AGW mon window is unlikely to be active window + if (TermMode == Single && (singlemodeFormat & Mon)) + { + // Can't be connected, so leave state alone, but disable TCP connects + + for (int i = 0; i < MAXHOSTS; i++) + actHost[i]->setVisible(0); + + } + else if (TermMode != Tabbed) // Not ideal, but AGW mon window is unlikely to be active window { discAction->setEnabled(false); YAPPSend->setEnabled(false); -- cgit v1.2.3