void Trace::paint_label(QPainter &p, int right, bool hover)
{
- const int y = get_y();
+ const int y = get_visual_y();
p.setBrush(_colour);
return _popup;
}
-QRectF Trace::label_rect(int right)
+QRectF Trace::label_rect(int right) const
{
using pv::view::View;
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());
}
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