fix for combobox bounce

This commit is contained in:
2026-02-14 14:31:30 +01:00
parent a910f7b36b
commit 7d78b7f6ba
4 changed files with 23 additions and 0 deletions
+7
View File
@@ -33,11 +33,13 @@ void Simulator_base::showEvent(QShowEvent *event)
{
QWidget::showEvent(event);
SPDLOG_DEBUG("Connecting callbacks");
m_first_load = true;
connect(m_web_socket, &Web_socket_wrapper::on_command_cb, this, [=, this](json &j) { on_cmd_cb(j); });
connect(m_web_socket, &Web_socket_wrapper::on_event_cb, this, [=, this](json &j) { on_event_cb(j); });
connect(m_web_socket, &Web_socket_wrapper::on_closed, this, [=, this] { m_error_dialog->open(); });
m_web_socket->inhibit_events(true);
m_web_socket->send_command(Web_socket_wrapper::Command::get_UI_elements);
this->m_timer_update->start(m_refresh_rate);
m_open = true;
@@ -69,6 +71,11 @@ void Simulator_base::on_cmd_cb(json &j)
default:
break;
}
if (m_first_load)
{
m_web_socket->inhibit_events(false);
m_first_load = false;
}
}
void Simulator_base::on_event_cb(json &j)