- current_segment_ = segment;
- for (shared_ptr<Signal> signal : signals_)
- signal->set_current_segment(current_segment_);
- for (shared_ptr<DecodeTrace> dt : decode_traces_)
- dt->set_current_segment(current_segment_);
- viewport_->update();
+ set_current_segment(segment);
+ break;
+
+ case Trace::ShowLastCompleteSegmentOnly:
+ {
+ // Only update if all segments are complete
+ bool all_complete = true;
+
+ for (shared_ptr<Signal> signal : signals_)
+ if (!signal->base()->segment_is_complete(segment))
+ all_complete = false;
+
+ if (all_complete)
+ set_current_segment(segment);
+ }