X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Ftoolbars%2Fsamplingbar.cpp;h=c34373776ca572ca101465a2fc73bfff2ab2cf80;hb=f27ee56d9c2b18158f2a9451b295123288134611;hp=550fc8482d1c7891a586adc8734dac3d684ac352;hpb=6ac6242b25cfbd4df14abe7580adc9d0f4cffe43;p=pulseview.git diff --git a/pv/toolbars/samplingbar.cpp b/pv/toolbars/samplingbar.cpp index 550fc84..c343737 100644 --- a/pv/toolbars/samplingbar.cpp +++ b/pv/toolbars/samplingbar.cpp @@ -66,6 +66,8 @@ SamplingBar::SamplingBar(SigSession &session, QWidget *parent) : _icon_grey(":/icons/status-grey.svg"), _run_stop_button(this) { + setObjectName(QString::fromUtf8("SamplingBar")); + connect(&_run_stop_button, SIGNAL(clicked()), this, SLOT(on_run_stop())); connect(&_device_selector, SIGNAL(currentIndexChanged (int)), @@ -337,13 +339,15 @@ void SamplingBar::update_device_config_widgets() gvar, &num_opts, sizeof(int32_t)); for (unsigned int i = 0; i < num_opts; i++) { - switch (options[i]) { + switch (options[i] & SR_CONF_MASK) { case SR_CONF_LIMIT_SAMPLES: - _sample_count_supported = true; + if (options[i] & SR_CONF_SET) + _sample_count_supported = true; break; case SR_CONF_LIMIT_FRAMES: - dev_inst->set_config(NULL, SR_CONF_LIMIT_FRAMES, - g_variant_new_uint64(1)); + if (options[i] & SR_CONF_SET) + dev_inst->set_config(NULL, SR_CONF_LIMIT_FRAMES, + g_variant_new_uint64(1)); break; } }