mirror of git://sigrok.org/pulseview
Fix warning and remove cursor pair selected state
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.
This commit is contained in:
parent
499f68de03
commit
5f0ea35639
|
@ -202,11 +202,13 @@ void CursorPair::paint_label(QPainter &p, const QRect &rect, bool hover)
|
|||
|
||||
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());
|
||||
|
|
|
@ -48,10 +48,10 @@ void MarginWidget::show_popup(const shared_ptr<ViewItem> &item)
|
|||
{
|
||||
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)
|
||||
|
|
Loading…
Reference in New Issue