]> sigrok.org Git - pulseview.git/blobdiff - pv/view/trace.cpp
RowItemOwner: Replaced parent notification scheme
[pulseview.git] / pv / view / trace.cpp
index f6c27430942a4d258cb93297b86114c9397354c3..9caa8f012adf57310f4ca65fe29c3254380b7c38 100644 (file)
@@ -70,7 +70,7 @@ void Trace::set_colour(QColor colour)
 
 void Trace::paint_label(QPainter &p, int right, bool hover)
 {
-       const int y = get_y();
+       const int y = get_visual_y();
 
        p.setBrush(_colour);
 
@@ -143,7 +143,7 @@ pv::widgets::Popup* Trace::create_popup(QWidget *parent)
        return _popup;
 }
 
-QRectF Trace::label_rect(int right)
+QRectF Trace::label_rect(int right) const
 {
        using pv::view::View;
 
@@ -157,7 +157,7 @@ QRectF Trace::label_rect(int right)
        const float half_height = label_size.height() / 2;
        return QRectF(
                right - half_height - label_size.width() - 0.5,
-               get_y() + 0.5f - half_height,
+               get_visual_y() + 0.5f - half_height,
                label_size.width() + half_height,
                label_size.height());
 }
@@ -223,13 +223,17 @@ void Trace::on_popup_closed()
 void Trace::on_text_changed(const QString &text)
 {
        set_name(text);
-       text_changed();
+
+       if (_owner)
+               _owner->extents_changed(true, false);
 }
 
 void Trace::on_colour_changed(const QColor &colour)
 {
        set_colour(colour);
-       colour_changed();
+
+       if (_owner)
+               _owner->appearance_changed(true, false);
 }
 
 } // namespace view