]> sigrok.org Git - pulseview.git/commitdiff
Fix #777 by using a workaround for assumed glibmm bug
authorSoeren Apel <redacted>
Sun, 17 Apr 2016 13:29:09 +0000 (15:29 +0200)
committerSoeren Apel <redacted>
Sun, 17 Apr 2016 13:29:09 +0000 (15:29 +0200)
pv/view/logicsignal.cpp

index 3c85b9319083d4cb9c0e401a0fa949ed6513cb5f..6eb68db381357835fe8fc3feb1d0ff2fb95697a3 100644 (file)
@@ -332,8 +332,20 @@ const vector<int32_t> 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<vector<int32_t>>>(gvar).get();
+
+               vector<int32_t> ttypes;
+
+               for (unsigned int i = 0; i < gvar.get_n_children(); i++) {
+                       Glib::VariantBase tmp_vb;
+                       gvar.get_child(tmp_vb, i);
+
+                       Glib::Variant<int32_t> tmp_v =
+                               Glib::VariantBase::cast_dynamic< Glib::Variant<int32_t> >(tmp_vb);
+
+                       ttypes.push_back(tmp_v.get());
+               }
+
+               return ttypes;
        } else {
                return vector<int32_t>();
        }