From de29cf1031b5898541c0888b5ee6f0bdbbed43d7 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 20 Oct 2017 05:27:39 +0200 Subject: options/tie: prevent feedback loop with enums --- options/tie.hpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'options') diff --git a/options/tie.hpp b/options/tie.hpp index b6bf32e9..ad38faf8 100644 --- a/options/tie.hpp +++ b/options/tie.hpp @@ -47,9 +47,11 @@ tie_setting(value& v, QComboBox* cb) }); }, v.DIRECT_CONNTYPE); - base_value::connect(&v, static_cast(&base_value::valueChanged), - cb, [cb](int x) { cb->setCurrentIndex(cb->findData(x)); }, - v.SAFE_CONNTYPE); + base_value::connect(&v, base_value::signal_fun(), + cb, [cb](int x) { + run_in_thread_sync(cb, [&]() { cb->setCurrentIndex(cb->findData(x)); }); + }, + v.DIRECT_CONNTYPE); } template -- cgit v1.2.3