From: Soeren Apel Date: Sun, 17 Apr 2016 13:29:09 +0000 (+0200) Subject: Fix #777 by using a workaround for assumed glibmm bug X-Git-Tag: pulseview-0.4.0~304 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=d60820d865b8044aa6447a49861eac0dd0a6a4d4;p=pulseview.git Fix #777 by using a workaround for assumed glibmm bug --- diff --git a/pv/view/logicsignal.cpp b/pv/view/logicsignal.cpp index 3c85b931..6eb68db3 100644 --- a/pv/view/logicsignal.cpp +++ b/pv/view/logicsignal.cpp @@ -332,8 +332,20 @@ const vector LogicSignal::get_trigger_types() const if (sr_dev->config_check(ConfigKey::TRIGGER_MATCH, Capability::LIST)) { const Glib::VariantContainerBase gvar = sr_dev->config_list(ConfigKey::TRIGGER_MATCH); - return Glib::VariantBase::cast_dynamic< - Glib::Variant>>(gvar).get(); + + vector ttypes; + + for (unsigned int i = 0; i < gvar.get_n_children(); i++) { + Glib::VariantBase tmp_vb; + gvar.get_child(tmp_vb, i); + + Glib::Variant tmp_v = + Glib::VariantBase::cast_dynamic< Glib::Variant >(tmp_vb); + + ttypes.push_back(tmp_v.get()); + } + + return ttypes; } else { return vector(); }