summaryrefslogtreecommitdiffstats
path: root/src/vanishing-point.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2015-07-25 19:12:30 +0000
committerJabiertxof <jtx@jtx.marker.es>2015-07-25 19:12:30 +0000
commitf0c58835ba91977fd0df1aa9bc4244f803cdcd16 (patch)
tree4b605918b7db00d4bfee9dd6eba758f74ff88f17 /src/vanishing-point.cpp
parentRemoves extra unnecesary code pointed by Nathan Hurst (diff)
parentSPKnot no longer consumes all GDK_KEY_PRESS events (diff)
downloadinkscape-f0c58835ba91977fd0df1aa9bc4244f803cdcd16.tar.gz
inkscape-f0c58835ba91977fd0df1aa9bc4244f803cdcd16.zip
update to trunk
(bzr r13973.1.20)
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