X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fdata%2Fmathsignal.cpp;h=adb27131e6d43bc00a89e788cf398c07ed57229a;hb=30cdef99af65a04ee8c55ab816044c32f7e955ad;hp=f7de2ff29103a0662e1dce62a74cb33a8372203c;hpb=2823de2c821f01b9b6d8df7fc972e290518075ae;p=pulseview.git diff --git a/pv/data/mathsignal.cpp b/pv/data/mathsignal.cpp index f7de2ff2..adb27131 100644 --- a/pv/data/mathsignal.cpp +++ b/pv/data/mathsignal.cpp @@ -307,8 +307,13 @@ void MathSignal::begin_generation() return; } - disconnect(this, SLOT(on_data_received())); - disconnect(this, SLOT(on_enabled_changed())); + disconnect(&session_, SIGNAL(data_received()), this, SLOT(on_data_received())); + + for (const shared_ptr& sb : session_.signalbases()) { + if (sb->analog_data()) + disconnect(sb->analog_data().get(), nullptr, this, SLOT(on_data_received())); + disconnect(sb.get(), nullptr, this, SLOT(on_enabled_changed())); + } fnc_sample_ = new fnc_sample(*this); @@ -371,8 +376,7 @@ void MathSignal::begin_generation() if (error_message_.isEmpty()) { // Connect to the session data notification if we have no input signals if (input_signals_.empty()) - connect(&session_, SIGNAL(data_received()), - this, SLOT(on_data_received())); + connect(&session_, SIGNAL(data_received()), this, SLOT(on_data_received())); gen_interrupt_ = false; gen_thread_ = std::thread(&MathSignal::generation_proc, this);