- p.setPen(HighlightColour);
- p.setBrush(QBrush());
- p.drawEllipse(r.adjusted(1, 1, -1, -1));
+ const QSizeF label_size(
+ text_size.width() + LabelPadding.width() * 2,
+ text_size.height() + LabelPadding.height() * 2);
+ const float top = rect.height() - label_size.height() -
+ TimeMarker::ArrowSize - 0.5f;
+ const float height = label_size.height();
+
+ const pv::util::Timestamp& other_time = other->time();
+
+ if (time_ > other_time ||
+ (abs(time_ - other_time).is_zero() && this > other.get()))
+ return QRectF(x, top, label_size.width(), height);
+ else
+ return QRectF(x - label_size.width(), top, label_size.width(), height);
+}
+
+shared_ptr<Cursor> Cursor::get_other_cursor() const
+{
+ const shared_ptr<CursorPair> cursors(view_.cursors());
+ assert(cursors);
+ return (cursors->first().get() == this) ?
+ cursors->second() : cursors->first();