]> sigrok.org Git - pulseview.git/blobdiff - pv/data/logic.cpp
Fix #1591 by updating Logic and Analog if needed
[pulseview.git] / pv / data / logic.cpp
index 038da649896a0f915883403fb420a37d9d36db0d..d2f89e856cd4ae58a9e682341670b88a8d003c3f 100644 (file)
@@ -46,6 +46,9 @@ unsigned int Logic::num_channels() const
 void Logic::push_segment(shared_ptr<LogicSegment> &segment)
 {
        segments_.push_back(segment);
+
+       if ((samplerate_ == 1) && (segment->samplerate() > 1))
+               samplerate_ = segment->samplerate();
 }
 
 const deque< shared_ptr<LogicSegment> >& Logic::logic_segments() const