diff --git a/Src/GDDC/gddcdlg.cpp b/Src/GDDC/gddcdlg.cpp index bfd8a67..1b35fdc 100644 --- a/Src/GDDC/gddcdlg.cpp +++ b/Src/GDDC/gddcdlg.cpp @@ -313,7 +313,7 @@ void GDDCdlg::mouseMoveEvent(QMouseEvent *event) { qDebug() << "x:" << diff.x() <<"y:" <setMoveParm(diff); - if(diff.x() > 5 || diff.y() >5)//像素点超过5ptx才算移动,否则为跟踪 + if(qAbs(diff.x()) > 5 || qAbs(diff.y()) >5)//像素点超过5ptx才算移动,否则为跟踪 { _moveFlag = true; firstLocation->move((_dragStartPositon - QPoint(firstLocation->width()/2, firstLocation->height()/2)).toPoint());