]> sigrok.org Git - pulseview.git/commitdiff
Session: Clear signal data before starting capture
authorSoeren Apel <redacted>
Thu, 23 Jul 2015 18:48:21 +0000 (20:48 +0200)
committerSoeren Apel <redacted>
Thu, 23 Jul 2015 18:48:21 +0000 (20:48 +0200)
pv/session.cpp

index b5d7911fede86af41f8e17e2914bd52a875691db..b90c03016d6b42cc924787710c7e547685728dd7 100644 (file)
@@ -179,6 +179,11 @@ void Session::start_capture(function<void (const QString)> error_handler)
                }
        }
 
+       // Clear signal data
+       const set< shared_ptr<data::SignalData> > signal_data = get_data();
+       for (const shared_ptr<data::SignalData> d : signal_data)
+               d->clear();
+
        // Begin the session
        sampling_thread_ = std::thread(
                &Session::sample_thread_proc, this, device_,