projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ViewWidget: Fixed glitching when drag is within the manhattan distance
[pulseview.git]
/
pv
/
view
/
viewwidget.cpp
diff --git
a/pv/view/viewwidget.cpp
b/pv/view/viewwidget.cpp
index a5174bb37ecd000332a199cea5790a7792e83770..cf7376646586f2a88d9eb5d9680808fd407635af 100644
(file)
--- a/
pv/view/viewwidget.cpp
+++ b/
pv/view/viewwidget.cpp
@@
-264,15
+264,19
@@
void ViewWidget::mouseMoveEvent(QMouseEvent *event)
if (!(event->buttons() & Qt::LeftButton))
return;
if (!(event->buttons() & Qt::LeftButton))
return;
- if ((event->pos() - mouse_down_point_).manhattanLength() <
- QApplication::startDragDistance())
- return;
+ if (!item_dragging_)
+ {
+ if ((event->pos() - mouse_down_point_).manhattanLength() <
+ QApplication::startDragDistance())
+ return;
- if (!accept_drag())
- return;
+ if (!accept_drag())
+ return;
+
+ item_dragging_ = true;
+ }
// Do the drag
// Do the drag
- item_dragging_ = true;
drag_items(event->pos() - mouse_down_point_);
update();
drag_items(event->pos() - mouse_down_point_);
update();