Fixes warning "QObject::connect: Cannot connect (nullptr)::closed() to pv::views::trace::Ruler::on_popup_closed()" and
removes showing the selected state for the cursor pair as it doesn't serve a purpose.
text_size_ = p.boundingRect(QRectF(), 0, text).size();
+ /* Currently, selecting the middle section between two cursors doesn't do
+ * anything, so don't highlight it when selected
if (selected()) {
p.setBrush(Qt::transparent);
p.setPen(highlight_pen());
p.drawRoundedRect(delta_rect, radius, radius);
- }
+ } */
p.setBrush(hover ? Cursor::FillColor.lighter() : Cursor::FillColor);
p.setPen(Cursor::FillColor.darker());
{
pv::widgets::Popup *const p = item->create_popup(this);
- connect(p, SIGNAL(closed()), this, SLOT(on_popup_closed()));
-
- if (p)
+ if (p) {
+ connect(p, SIGNAL(closed()), this, SLOT(on_popup_closed()));
p->show();
+ }
}
void MarginWidget::contextMenuEvent(QContextMenuEvent *event)