projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix #1132 by passing segment IDs, not segment instances
[pulseview.git]
/
pv
/
views
/
trace
/
trace.cpp
diff --git
a/pv/views/trace/trace.cpp
b/pv/views/trace/trace.cpp
index b5fc0b1b5478333930ffbb150460c779a0a2ee40..91fde4725cbbf6f142644174a7e1103be26ff5fa 100644
(file)
--- a/
pv/views/trace/trace.cpp
+++ b/
pv/views/trace/trace.cpp
@@
-52,6
+52,7
@@
Trace::Trace(shared_ptr<data::SignalBase> channel) :
base_(channel),
axis_pen_(AxisPen),
segment_display_mode_(ShowLastSegmentOnly), // Will be overwritten by View
base_(channel),
axis_pen_(AxisPen),
segment_display_mode_(ShowLastSegmentOnly), // Will be overwritten by View
+ current_segment_(0),
popup_(nullptr),
popup_form_(nullptr)
{
popup_(nullptr),
popup_form_(nullptr)
{
@@
-161,6
+162,16
@@
QRectF Trace::label_rect(const QRectF &rect) const
label_size.height());
}
label_size.height());
}
+void Trace::set_current_segment(const int segment)
+{
+ current_segment_ = segment;
+}
+
+int Trace::get_current_segment() const
+{
+ return current_segment_;
+}
+
void Trace::paint_back(QPainter &p, ViewItemPaintParams &pp)
{
const View *view = owner_->view();
void Trace::paint_back(QPainter &p, ViewItemPaintParams &pp)
{
const View *view = owner_->view();