From: Joel Holdsworth Date: Sun, 21 Dec 2014 11:07:53 +0000 (+0000) Subject: MarginWidget: Moved in leaveEvent X-Git-Tag: pulseview-0.3.0~317 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=19552bb8dff1708939544beecb448bcc91f46644;p=pulseview.git MarginWidget: Moved in leaveEvent --- diff --git a/pv/view/header.cpp b/pv/view/header.cpp index 81973802..04e4c764 100644 --- a/pv/view/header.cpp +++ b/pv/view/header.cpp @@ -252,12 +252,6 @@ void Header::mouseMoveEvent(QMouseEvent *event) update(); } -void Header::leaveEvent(QEvent*) -{ - mouse_point_ = QPoint(-1, -1); - update(); -} - void Header::contextMenuEvent(QContextMenuEvent *event) { const shared_ptr r = get_mouse_over_item(mouse_point_); diff --git a/pv/view/header.hpp b/pv/view/header.hpp index 62c29c16..3c94f791 100644 --- a/pv/view/header.hpp +++ b/pv/view/header.hpp @@ -76,8 +76,6 @@ private: void mouseMoveEvent(QMouseEvent *event); - void leaveEvent(QEvent *event); - void contextMenuEvent(QContextMenuEvent *event); void keyPressEvent(QKeyEvent *e); diff --git a/pv/view/marginwidget.cpp b/pv/view/marginwidget.cpp index 6b646832..b4b12140 100644 --- a/pv/view/marginwidget.cpp +++ b/pv/view/marginwidget.cpp @@ -46,6 +46,12 @@ void MarginWidget::show_popup(const shared_ptr &item) p->show(); } +void MarginWidget::leaveEvent(QEvent*) +{ + mouse_point_ = QPoint(-1, -1); + update(); +} + void MarginWidget::clear_selection() { } diff --git a/pv/view/marginwidget.hpp b/pv/view/marginwidget.hpp index a97b22c1..de5c866f 100644 --- a/pv/view/marginwidget.hpp +++ b/pv/view/marginwidget.hpp @@ -53,6 +53,9 @@ protected: */ void show_popup(const std::shared_ptr &item); +private: + void leaveEvent(QEvent *event); + public Q_SLOTS: virtual void clear_selection(); diff --git a/pv/view/ruler.cpp b/pv/view/ruler.cpp index 7fa99875..0c4dcb0b 100644 --- a/pv/view/ruler.cpp +++ b/pv/view/ruler.cpp @@ -209,12 +209,6 @@ void Ruler::mouseReleaseEvent(QMouseEvent *) i->drag_release(); } -void Ruler::leaveEvent(QEvent*) -{ - mouse_point_ = QPoint(-1, -1); - update(); -} - void Ruler::mouseDoubleClickEvent(QMouseEvent *e) { view_.add_flag(view_.offset() + ((double)e->x() + 0.5) * view_.scale()); diff --git a/pv/view/ruler.hpp b/pv/view/ruler.hpp index 89b9ff4c..5720c9a9 100644 --- a/pv/view/ruler.hpp +++ b/pv/view/ruler.hpp @@ -70,7 +70,6 @@ private: void mouseMoveEvent(QMouseEvent *e); void mousePressEvent(QMouseEvent *e); void mouseReleaseEvent(QMouseEvent *); - void leaveEvent(QEvent*); void mouseDoubleClickEvent(QMouseEvent *e);