src/editmodes/abstractEditMode.cpp

changeset 1013
fa025ba493d8
parent 1012
413ecd6b9801
child 1014
f0a8ecb6a357
equal deleted inserted replaced
1012:413ecd6b9801 1013:fa025ba493d8
289 Axis relX, relY; 289 Axis relX, relY;
290 290
291 renderer()->getRelativeAxes (relX, relY); 291 renderer()->getRelativeAxes (relX, relY);
292 QLineF ln (v0[relX], v0[relY], v1[relX], v1[relY]); 292 QLineF ln (v0[relX], v0[relY], v1[relX], v1[relY]);
293 ln.setAngle (intervalClamp<int> (ln.angle(), 45)); 293 ln.setAngle (intervalClamp<int> (ln.angle(), 45));
294 result.setCoordinate (relX, Grid::Snap (ln.x2(), Grid::Coordinate)); 294 result.setCoordinate (relX, snapToGrid (ln.x2(), Grid::Coordinate));
295 result.setCoordinate (relY, Grid::Snap (ln.y2(), Grid::Coordinate)); 295 result.setCoordinate (relY, snapToGrid (ln.y2(), Grid::Coordinate));
296 } 296 }
297 297
298 return result; 298 return result;
299 } 299 }

mercurial