Don't set SR_CONF_LIMIT_FRAMES to 1
[pulseview.git] / pv / toolbars / mainbar.cpp
index 22ed3988cfb72ccfb824390c03d1b4354b8dd4ed..c7b373341041f0bb76491b4ac70709e65da3e03c 100644 (file)
@@ -35,6 +35,7 @@
 
 #include <boost/algorithm/string/join.hpp>
 
+#include <pv/data/decodesignal.hpp>
 #include <pv/devicemanager.hpp>
 #include <pv/devices/hardwaredevice.hpp>
 #include <pv/devices/inputfile.hpp>
@@ -479,12 +480,6 @@ void MainBar::update_device_config_widgets()
        if (sr_dev->config_check(ConfigKey::LIMIT_SAMPLES, Capability::SET))
                sample_count_supported_ = true;
 
-       if (sr_dev->config_check(ConfigKey::LIMIT_FRAMES, Capability::SET)) {
-               sr_dev->config_set(ConfigKey::LIMIT_FRAMES,
-                       Glib::Variant<guint64>::create(1));
-                       on_config_changed();
-       }
-
        // Add notification of reconfigure events
        disconnect(this, SLOT(on_config_changed()));
        connect(&opts->binding(), SIGNAL(config_changed()),
@@ -575,7 +570,9 @@ void MainBar::add_decoder(srd_decoder *decoder)
 {
 #ifdef ENABLE_DECODE
        assert(decoder);
-       session_.add_decoder(decoder);
+       shared_ptr<data::DecodeSignal> signal = session_.add_decode_signal();
+       if (signal)
+               signal->stack_decoder(decoder);
 #else
        (void)decoder;
 #endif