From: Joel Holdsworth Date: Sat, 27 Dec 2014 20:07:21 +0000 (+0000) Subject: ViewWidget: Renamed dragging_ to item_dragging_ X-Git-Tag: pulseview-0.3.0~300 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=803cdac41caf71af9298e3f612468aa522a107d5;p=pulseview.git ViewWidget: Renamed dragging_ to item_dragging_ --- diff --git a/pv/view/header.cpp b/pv/view/header.cpp index e3ad9d38..26aae49f 100644 --- a/pv/view/header.cpp +++ b/pv/view/header.cpp @@ -113,7 +113,7 @@ void Header::paintEvent(QPaintEvent*) { assert(r); - const bool highlight = !dragging_ && + const bool highlight = !item_dragging_ && r->label_rect(rect).contains(mouse_point_); r->paint_label(painter, rect, highlight); } diff --git a/pv/view/ruler.cpp b/pv/view/ruler.cpp index bd106b97..2f9b140e 100644 --- a/pv/view/ruler.cpp +++ b/pv/view/ruler.cpp @@ -148,7 +148,7 @@ void Ruler::paintEvent(QPaintEvent*) // Draw the items const vector< shared_ptr > items(view_.time_items()); for (auto &i : items) { - const bool highlight = !dragging_ && + const bool highlight = !item_dragging_ && i->label_rect(r).contains(mouse_point_); i->paint_label(p, r, highlight); } diff --git a/pv/view/viewwidget.cpp b/pv/view/viewwidget.cpp index 0b3b2fd1..57053298 100644 --- a/pv/view/viewwidget.cpp +++ b/pv/view/viewwidget.cpp @@ -35,7 +35,7 @@ namespace view { ViewWidget::ViewWidget(View &parent) : QWidget(&parent), view_(parent), - dragging_(false) + item_dragging_(false) { setFocusPolicy(Qt::ClickFocus); setMouseTracking(true); @@ -157,7 +157,7 @@ void ViewWidget::mouse_left_release_event(QMouseEvent *event) for (auto &i : items) i->drag_release(); - if (dragging_) + if (item_dragging_) view_.restack_all_row_items(); else { @@ -171,7 +171,7 @@ void ViewWidget::mouse_left_release_event(QMouseEvent *event) } } - dragging_ = false; + item_dragging_ = false; } void ViewWidget::mousePressEvent(QMouseEvent *event) @@ -210,7 +210,7 @@ void ViewWidget::mouseMoveEvent(QMouseEvent *event) return; // Do the drag - dragging_ = true; + item_dragging_ = true; drag_items(event->pos() - mouse_down_point_); update(); diff --git a/pv/view/viewwidget.hpp b/pv/view/viewwidget.hpp index fc724762..1d50832b 100644 --- a/pv/view/viewwidget.hpp +++ b/pv/view/viewwidget.hpp @@ -102,7 +102,7 @@ protected: QPoint mouse_point_; QPoint mouse_down_point_; std::shared_ptr mouse_down_item_; - bool dragging_; + bool item_dragging_; }; } // namespace view