summaryrefslogtreecommitdiffstats
path: root/src/vanishing-point.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2015-07-24 23:31:44 +0000
committerJabiertxof <jtx@jtx.marker.es>2015-07-24 23:31:44 +0000
commitfae4db6d2c975173a6768bd4984eb707265f4e43 (patch)
tree5f2a213743a58ba45d47aeb5e49f67d3e0b78981 /src/vanishing-point.cpp
parentastyle (diff)
parent3D box tool: the shift key must not prevent snapping of the vanishing point. ... (diff)
downloadinkscape-fae4db6d2c975173a6768bd4984eb707265f4e43.tar.gz
inkscape-fae4db6d2c975173a6768bd4984eb707265f4e43.zip
update to trunk
(bzr r13645.1.106)
Diffstat (limited to 'src/vanishing-point.cpp')
-rw-r--r--src/vanishing-point.cpp30
1 files changed, 16 insertions, 14 deletions
diff --git a/src/vanishing-point.cpp b/src/vanishing-point.cpp
index 46f895c06..553e3a31d 100644
--- a/src/vanishing-point.cpp
+++ b/src/vanishing-point.cpp
@@ -130,7 +130,7 @@ vp_knot_moved_handler (SPKnot *knot, Geom::Point const &ppointer, guint state, g
// FIXME: Do we need to create a new dragger as well?
dragger->updateZOrders ();
DocumentUndo::done(SP_ACTIVE_DESKTOP->getDocument(), SP_VERB_CONTEXT_3DBOX,
- _("Split vanishing points"));
+ _("Split vanishing points"));
return;
}
}
@@ -175,22 +175,24 @@ vp_knot_moved_handler (SPKnot *knot, Geom::Point const &ppointer, guint state, g
// as is currently the case.
DocumentUndo::done(SP_ACTIVE_DESKTOP->getDocument(), SP_VERB_CONTEXT_3DBOX,
- _("Merge vanishing points"));
+ _("Merge vanishing points"));
return;
}
}
+ }
- // We didn't snap to another dragger, so we'll try a regular snap
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
- SnapManager &m = desktop->namedview->snap_manager;
- m.setup(desktop);
- Inkscape::SnappedPoint s = m.freeSnap(Inkscape::SnapCandidatePoint(p, Inkscape::SNAPSOURCE_OTHER_HANDLE));
- m.unSetup();
- if (s.getSnapped()) {
- p = s.getPoint();
- knot->moveto(p);
- }
+ // We didn't hit the return statement above, so we didn't snap to another dragger. Therefore we'll now try a regular snap
+ // Regardless of the status of the SHIFT key, we will try to snap; Here SHIFT does not disable snapping, as the shift key
+ // has a different purpose in this context (see above)
+ SPDesktop *desktop = SP_ACTIVE_DESKTOP;
+ SnapManager &m = desktop->namedview->snap_manager;
+ m.setup(desktop);
+ Inkscape::SnappedPoint s = m.freeSnap(Inkscape::SnapCandidatePoint(p, Inkscape::SNAPSOURCE_OTHER_HANDLE));
+ m.unSetup();
+ if (s.getSnapped()) {
+ p = s.getPoint();
+ knot->moveto(p);
}
dragger->point = p; // FIXME: Is dragger->point being used at all?
@@ -241,7 +243,7 @@ vp_knot_ungrabbed_handler (SPKnot *knot, guint /*state*/, gpointer data)
g_return_if_fail (dragger->parent);
g_return_if_fail (dragger->parent->document);
DocumentUndo::done(dragger->parent->document, SP_VERB_CONTEXT_3DBOX,
- _("3D box: Move vanishing point"));
+ _("3D box: Move vanishing point"));
}
unsigned int VanishingPoint::global_counter = 0;
@@ -630,7 +632,7 @@ VPDrag::updateBoxHandles ()
// FIXME: Is there a way to update the knots without accessing the
// (previously) statically linked function KnotHolder::update_knots?
- std::vector<SPItem*> sel = selection->itemList();
+ std::vector<SPItem*> sel = selection->itemList();
if (sel.empty())
return; // no selection