]> sigrok.org Git - pulseview.git/commitdiff
DecodeTrace: Reset cached trace properties when decoder stack resets
authorSoeren Apel <redacted>
Sat, 9 Sep 2017 07:01:07 +0000 (09:01 +0200)
committerSoeren Apel <redacted>
Fri, 22 Sep 2017 19:13:48 +0000 (21:13 +0200)
pv/data/decodesignal.cpp
pv/data/decodesignal.hpp
pv/views/trace/decodetrace.cpp
pv/views/trace/decodetrace.hpp

index 03ecc2efcc3a0bbb7fd42b90133514969952f7b3..8bdad1097af99c654779f5a8c48f0d05d77d4e4d 100644 (file)
@@ -155,6 +155,8 @@ void DecodeSignal::reset_decode()
 
        logic_mux_data_.reset();
        logic_mux_data_invalid_ = true;
+
+       decode_reset();
 }
 
 void DecodeSignal::begin_decode()
index 3187c850216dc1a4331bcca40d0b2ab504a01331..dd2ad79dbb790f0553220fe34fbb211ba710ca2f 100644 (file)
@@ -153,6 +153,7 @@ private:
 
 Q_SIGNALS:
        void new_annotations();
+       void decode_reset();
        void decode_finished();
        void channels_updated();
 
index 7bbc5a19b526cd5afa6856a578f1d03f989533df..509e77f6224b5dacbd9514d47f48b245f47a6c08 100644 (file)
@@ -146,6 +146,8 @@ DecodeTrace::DecodeTrace(pv::Session &session,
 
        connect(decode_signal_.get(), SIGNAL(new_annotations()),
                this, SLOT(on_new_annotations()));
+       connect(decode_signal_.get(), SIGNAL(decode_reset()),
+               this, SLOT(on_decode_reset()));
        connect(decode_signal_.get(), SIGNAL(decode_finished()),
                this, SLOT(on_decode_finished()));
        connect(decode_signal_.get(), SIGNAL(channels_updated()),
@@ -889,6 +891,15 @@ void DecodeTrace::on_delayed_trace_update()
                owner_->row_item_appearance_changed(false, true);
 }
 
+void DecodeTrace::on_decode_reset()
+{
+       visible_rows_.clear();
+       max_visible_rows_ = 0;
+
+       if (owner_)
+               owner_->row_item_appearance_changed(false, true);
+}
+
 void DecodeTrace::on_decode_finished()
 {
        if (owner_)
index fe3503b6008817b4d47b9fc0b10ffe47d3ab9d01..43473873444f01ba3f786b3c1fcd63b084215f70 100644 (file)
@@ -184,6 +184,7 @@ public:
 private Q_SLOTS:
        void on_new_annotations();
        void on_delayed_trace_update();
+       void on_decode_reset();
        void on_decode_finished();
 
        void on_delete();