summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ce92a40)
raw | patch | inline | side by side (parent: ce92a40)
| author | buliabyak <buliabyak@users.sourceforge.net> | |
| Mon, 25 Feb 2008 10:06:53 +0000 (10:06 +0000) | ||
| committer | buliabyak <buliabyak@users.sourceforge.net> | |
| Mon, 25 Feb 2008 10:06:53 +0000 (10:06 +0000) |
| src/object-edit.cpp | patch | blob | history |
diff --git a/src/object-edit.cpp b/src/object-edit.cpp
index f9d34b9d6f455ddcc33ce905f62737b4bc04dcae..da5672ca261de302afa06c558f0e90eb575d2b7a 100644 (file)
--- a/src/object-edit.cpp
+++ b/src/object-edit.cpp
static void box3d_knot_set(SPItem *item, guint knot_id, NR::Point const &new_pos, NR::Point const &/*origin*/, guint state)
{
+ NR::Point const s = snap_knot_position(item, new_pos);
+
g_assert(item != NULL);
SPBox3D *box = SP_BOX3D(item);
NR::Matrix const i2d (sp_item_i2d_affine (item));
@@ -550,7 +552,7 @@ static void box3d_knot_set(SPItem *item, guint knot_id, NR::Point const &new_pos
movement = Box3D::Z;
}
- box3d_set_corner (box, knot_id, new_pos * i2d, movement, (state & GDK_CONTROL_MASK));
+ box3d_set_corner (box, knot_id, s * i2d, movement, (state & GDK_CONTROL_MASK));
box3d_set_z_orders(box);
box3d_position_set(box);
}
static void box3d_knot_center_set(SPItem *item, NR::Point const &new_pos, NR::Point const &origin, guint state)
{
+ NR::Point const s = snap_knot_position(item, new_pos);
+
SPBox3D *box = SP_BOX3D(item);
NR::Matrix const i2d (sp_item_i2d_affine (item));
- box3d_set_center (SP_BOX3D(item), new_pos * i2d, origin * i2d, !(state & GDK_SHIFT_MASK) ? Box3D::XY : Box3D::Z,
+ box3d_set_center (SP_BOX3D(item), s * i2d, origin * i2d, !(state & GDK_SHIFT_MASK) ? Box3D::XY : Box3D::Z,
state & GDK_CONTROL_MASK);
box3d_set_z_orders(box);
// center dragging
sp_knot_holder_add_full(knot_holder, box3d_knot_center_set, box3d_knot_center_get, NULL,
- SP_KNOT_SHAPE_CROSS, SP_KNOT_MODE_XOR,_("Move the box in perspective."));
+ SP_KNOT_SHAPE_CROSS, SP_KNOT_MODE_XOR,_("Move the box in perspective"));
sp_pat_knot_holder(item, knot_holder);