Skip to content

Commit

Permalink
ticket:4308 Move by factor of 5 when shift key is pressed.
Browse files Browse the repository at this point in the history
  • Loading branch information
adeas31 committed Oct 12, 2017
1 parent 47db56e commit f627d10
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions OMEdit/OMEditGUI/Modeling/ModelWidgetContainer.cpp
Expand Up @@ -1041,8 +1041,8 @@ QPointF GraphicsView::snapPointToGrid(QPointF point)

QPointF GraphicsView::movePointByGrid(QPointF point)
{
qreal stepX = mCoOrdinateSystem.getHorizontalGridStep();
qreal stepY = mCoOrdinateSystem.getVerticalGridStep();
qreal stepX = mCoOrdinateSystem.getHorizontalGridStep() * (QApplication::keyboardModifiers().testFlag(Qt::ShiftModifier) ? 5 : 1);
qreal stepY = mCoOrdinateSystem.getVerticalGridStep() * (QApplication::keyboardModifiers().testFlag(Qt::ShiftModifier) ? 5 : 1);
point.setX(qRound(point.x() / stepX) * stepX);
point.setY(qRound(point.y() / stepY) * stepY);
return point;
Expand Down

0 comments on commit f627d10

Please sign in to comment.