Commit 0a2a36a3 authored by Mike Kremer's avatar Mike Kremer
Browse files

Changed snapping feature such that it must be activated by holding the Alt key...

Changed snapping feature such that it must be activated by holding the Alt key when dragging selections.

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@6963 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 483e76d7
......@@ -934,7 +934,7 @@ TranslationManipulatorNode::mouseEvent(GLState& _state, QMouseEvent* _event)
// is near enough
if (abs(d_origin[0] - newPoint2D[0]) < SNAP_PIXEL_TOLERANCE &&
abs(_state.context_height() - d_origin[1] - newPoint2D[1]) < SNAP_PIXEL_TOLERANCE
&& !(_event->modifiers() & Qt::AltModifier)) {
&& _event->modifiers() & Qt::AltModifier) {
newPoint2D = oldPoint2D_;
Vec3d backtrans = draggingOrigin3D_ - center();
if (mode_ != Resize) {
......@@ -977,7 +977,7 @@ TranslationManipulatorNode::mouseEvent(GLState& _state, QMouseEvent* _event)
// is near enough
if (abs(d_origin[0] - newPoint2D[0]) < SNAP_PIXEL_TOLERANCE &&
abs(_state.context_height() - d_origin[1] - newPoint2D[1]) < SNAP_PIXEL_TOLERANCE
&& !(_event->modifiers() & Qt::AltModifier)) {
&& _event->modifiers() & Qt::AltModifier) {
newPoint2D = oldPoint2D_;
Vec3d backtrans = draggingOrigin3D_ - center();
if (mode_ != Resize) {
......@@ -1039,7 +1039,7 @@ TranslationManipulatorNode::mouseEvent(GLState& _state, QMouseEvent* _event)
// is near enough
if (abs(d_origin[0] - newPoint2D[0]) < SNAP_PIXEL_TOLERANCE &&
abs(_state.context_height() - d_origin[1] - newPoint2D[1]) < SNAP_PIXEL_TOLERANCE
&& !(_event->modifiers() & Qt::AltModifier)) {
&& _event->modifiers() & Qt::AltModifier) {
newPoint2D = oldPoint2D_;
Vec3d backtrans = draggingOrigin3D_ - center();
if (mode_ != Resize) {
......@@ -1096,7 +1096,7 @@ TranslationManipulatorNode::mouseEvent(GLState& _state, QMouseEvent* _event)
// is near enough
if (abs(d_origin[0] - newPoint2D[0]) < SNAP_PIXEL_TOLERANCE &&
abs(_state.context_height() - d_origin[1] - newPoint2D[1]) < SNAP_PIXEL_TOLERANCE
&& !(_event->modifiers() & Qt::AltModifier)) {
&& _event->modifiers() & Qt::AltModifier) {
newPoint2D = oldPoint2D_;
Vec3d backtrans = draggingOrigin3D_ - center();
if (mode_ != Resize) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment