]> sigrok.org Git - pulseview.git/blobdiff - pv/views/trace/marginwidget.cpp
Fix warning and remove cursor pair selected state
[pulseview.git] / pv / views / trace / marginwidget.cpp
index 537ffe5ef298ad29b1cc6dd00a9ab5bab1992fd5..347b41edfe7bcfb6afef775b58aa96568762fdb1 100644 (file)
@@ -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)