diff options
| author | Diederik van Lierop <mail@diedenrezi.nl> | 2007-03-16 21:26:53 +0000 |
|---|---|---|
| committer | dvlierop2 <dvlierop2@users.sourceforge.net> | 2007-03-16 21:26:53 +0000 |
| commit | fcf0c0d5effa07885b4358c34c69c4f118aa8042 (patch) | |
| tree | 74f7a2864cdebdddbbac0a55077badb360a30a51 /src/object-edit.cpp | |
| parent | fix 1679477 (diff) | |
| download | inkscape-fcf0c0d5effa07885b4358c34c69c4f118aa8042.tar.gz inkscape-fcf0c0d5effa07885b4358c34c69c4f118aa8042.zip | |
Fix bug #1511262: don't snap rect to itself
(bzr r2675)
Diffstat (limited to 'src/object-edit.cpp')
| -rw-r--r-- | src/object-edit.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/object-edit.cpp b/src/object-edit.cpp index 2eabdd7bd..5ca346977 100644 --- a/src/object-edit.cpp +++ b/src/object-edit.cpp @@ -331,18 +331,18 @@ static NR::Point sp_rect_wh_get(SPItem *item) return NR::Point(rect->x.computed + rect->width.computed, rect->y.computed + rect->height.computed); } -static NR::Point rect_snap_knot_position(NR::Point const &p) +static NR::Point rect_snap_knot_position(SPRect *rect, NR::Point const &p) { SPDesktop const *desktop = inkscape_active_desktop(); NR::Point s = sp_desktop_dt2root_xy_point(desktop, p); SnapManager const &m = desktop->namedview->snap_manager; - s = m.freeSnap(Inkscape::Snapper::BBOX_POINT | Inkscape::Snapper::SNAP_POINT, s, NULL).getPoint(); + s = m.freeSnap(Inkscape::Snapper::BBOX_POINT | Inkscape::Snapper::SNAP_POINT, s, rect).getPoint(); return sp_desktop_root2dt_xy_point(desktop, s); } static void sp_rect_wh_set_internal(SPRect *rect, NR::Point const &p, NR::Point const &origin, guint state) { - NR::Point const s = rect_snap_knot_position(p); + NR::Point const s = rect_snap_knot_position(rect, p); if (state & GDK_CONTROL_MASK) { // original width/height when drag started @@ -420,7 +420,7 @@ static void sp_rect_xy_set(SPItem *item, NR::Point const &p, NR::Point const &or gdouble w_orig = opposite_x - origin[NR::X]; gdouble h_orig = opposite_y - origin[NR::Y]; - NR::Point const s = rect_snap_knot_position(p); + NR::Point const s = rect_snap_knot_position(rect, p); // mouse displacement since drag started gdouble minx = s[NR::X] - origin[NR::X]; |
