X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fview%2Fruler.cpp;h=a9a8452d47fc6784d6d736762ba4938ce3408895;hp=06cd1b1540ba3dca171d2cd286cdc35f66d1fd86;hb=b213ef0991a13af0c74ffe5c54382c5c455c5496;hpb=4030e03db23566ccc2521c7c40903d0f360797ca diff --git a/pv/view/ruler.cpp b/pv/view/ruler.cpp index 06cd1b15..a9a8452d 100644 --- a/pv/view/ruler.cpp +++ b/pv/view/ruler.cpp @@ -30,10 +30,13 @@ #include #include +#include #include #include #include +#include + using namespace boost; using namespace std; @@ -225,6 +228,16 @@ void Ruler::mousePressEvent(QMouseEvent *e) void Ruler::mouseReleaseEvent(QMouseEvent *) { + using pv::widgets::Popup; + + if (!_dragging) + if (shared_ptr m = _grabbed_marker.lock()) { + Popup *const p = m->create_popup(&_view); + p->set_position(mapToGlobal(QPoint(m->get_x(), + height())), Popup::Bottom); + p->show(); + } + _dragging = false; _grabbed_marker.reset(); }