void MarginWidget::show_popup(const shared_ptr<ViewItem> &item)
{
pv::widgets::Popup *const p = item->create_popup(this);
- if (p)
+
+ if (p) {
+ connect(p, SIGNAL(closed()), this, SLOT(on_popup_closed()));
p->show();
+ }
}
void MarginWidget::contextMenuEvent(QContextMenuEvent *event)
ViewWidget::keyPressEvent(event);
}
+void MarginWidget::on_popup_closed()
+{
+ bool cursor_above_widget = rect().contains(mapFromGlobal(QCursor::pos()));
+
+ if (!cursor_above_widget)
+ mouse_point_ = QPoint(INT_MIN, INT_MIN);
+
+ update();
+}
+
+
} // namespace trace
} // namespace views
} // namespace pv