X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fprop%2Fbinding%2Fdecoderoptions.cpp;h=930e1f0aee14c77a860ca8242b729218fdc614be;hb=d9aecf1fcd9af471db3b59de7efc65b9632a6d79;hp=d9904852ca645e21f6b4b4d447a200860e301d94;hpb=182d2f5dbe8b631b24949e5b111762009d1eeefa;p=pulseview.git diff --git a/pv/prop/binding/decoderoptions.cpp b/pv/prop/binding/decoderoptions.cpp index d990485..930e1f0 100644 --- a/pv/prop/binding/decoderoptions.cpp +++ b/pv/prop/binding/decoderoptions.cpp @@ -23,11 +23,11 @@ #include "decoderoptions.h" #include -#include #include #include #include +#include #include #include #include @@ -72,6 +72,9 @@ DecoderOptions::DecoderOptions( if (opt->values) prop = bind_enum(name, opt, getter, setter); + else if (g_variant_is_of_type(opt->def, G_VARIANT_TYPE("d"))) + prop = shared_ptr(new Double(name, 2, "", + none, none, getter, setter)); else if (g_variant_is_of_type(opt->def, G_VARIANT_TYPE("x"))) prop = shared_ptr( new Int(name, "", none, getter, setter)); @@ -107,7 +110,7 @@ GVariant* DecoderOptions::getter(const char *id) // Get the value from the hash table if it is already present const map& options = _decoder->options(); - map::const_iterator iter = options.find(id); + const auto iter = options.find(id); if (iter != options.end()) val = (*iter).second;