From a080d0ca80d757519367a38a480caee0fb1f0173 Mon Sep 17 00:00:00 2001 From: Duke Date: Sun, 26 Mar 2023 10:19:12 -0700 Subject: [PATCH] Update current server on info tab since it can change at run-time --- src/controller.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/controller.cpp b/src/controller.cpp index 61cbd44..c280b07 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -297,12 +297,19 @@ void Controller::processInfo(const json& info) main->disableRecurring(); } -void Controller::getInfoThenRefresh(bool force) +void Controller::getInfoThenRefresh(bool force) { qDebug()<< __func__; - if (!zrpc->haveConnection()) + if (!zrpc->haveConnection()) return noConnection(); + // Update current server in Info Tab + auto current_server = Settings::getInstance()->getSettings().server; + ui->current_server->setText(current_server); + + // no need to update sticky server because currently there is no + // way to change that at run-time via GUI + static bool prevCallSucceeded = false; zrpc->fetchInfo([=] (const json& reply) {