Changeset - 09bde1185cf5
[Not reviewed]
default
0 1 0
Hasan Yavuz Ă–ZDERYA - 10 years ago 2015-11-07 16:34:28
hy@ozderya.net
disable snapping with shift key
1 file changed with 4 insertions and 1 deletions:
0 comments (0 inline, 0 general)
scalepicker.cpp
Show inline comments
 
@@ -102,7 +102,9 @@ bool ScalePicker::eventFilter(QObject* o
 
        QMouseEvent* mouseEvent = (QMouseEvent*) event;
 
        double posPx = this->positionPx(mouseEvent);
 

	
 
        // do snapping
 
        // do snapping unless Shift is pressed
 
        if (! (mouseEvent->modifiers() & Qt::ShiftModifier))
 
        {
 
        for (double sp : snapPoints)
 
        {
 
            if (fabs(posPx-sp) <= SNAP_DISTANCE)
 
@@ -111,6 +113,7 @@ bool ScalePicker::eventFilter(QObject* o
 
                break;
 
            }
 
        }
 
        }
 

	
 
        double pos = this->position(posPx);
 
        currentPosPx = posPx;
0 comments (0 inline, 0 general)