From c5a3e612c363f761171123cf62f65c85808c296e Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Sat, 5 Jul 2014 15:23:33 +0200 Subject: Fix regression that prevented snapping back to original location, caused by rev. 13333 Fixed bugs: - https://launchpad.net/bugs/1337170 (bzr r13446) --- src/seltrans.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/seltrans.cpp') diff --git a/src/seltrans.cpp b/src/seltrans.cpp index d6f31f073..d16e02e42 100644 --- a/src/seltrans.cpp +++ b/src/seltrans.cpp @@ -377,12 +377,6 @@ void Inkscape::SelTrans::transform(Geom::Affine const &rel_affine, Geom::Point c g_return_if_fail(_grabbed); g_return_if_fail(!_empty); - // E.g. scaling a perfectly vertical line in horizontal direction will not work, and will produce an identity affine - - if (rel_affine.isIdentity()) { - return; - } - Geom::Affine const affine( Geom::Translate(-norm) * rel_affine * Geom::Translate(norm) ); if (_show == SHOW_CONTENT) { @@ -1327,6 +1321,16 @@ void Inkscape::SelTrans::stretch(SPSelTransHandle const &/*handle*/, Geom::Point void Inkscape::SelTrans::scale(Geom::Point &/*pt*/, guint /*state*/) { + // E.g. scaling a perfectly vertical line in horizontal direction will not work, and will produce an identity affine + // Applying a transformation is useless, so we will not attempt to do so because this might trigger other bugs + // (see https://bugs.launchpad.net/inkscape/+bug/1256597) + // We check for this here and not in transform because identity transformations are perfectly fine for for example + // translations (e.g. a translation of (0,0), which occurs when snapping a point back to its original location) + + if (_absolute_affine.isIdentity()) { + return; + } + transform(_absolute_affine, Geom::Point(0, 0)); // we have already accounted for origin, so pass 0,0 } -- cgit v1.2.3 From ac8283706beb41435d25ea5d880fe44d68679803 Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Fri, 11 Jul 2014 20:28:15 +0200 Subject: Fix regression introduced by rev 13446 / 13333 Fixed bugs: - https://launchpad.net/bugs/1256597 - https://launchpad.net/bugs/1340011 (bzr r13450) --- src/seltrans.cpp | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'src/seltrans.cpp') diff --git a/src/seltrans.cpp b/src/seltrans.cpp index d16e02e42..4b1a3a5fa 100644 --- a/src/seltrans.cpp +++ b/src/seltrans.cpp @@ -1321,16 +1321,6 @@ void Inkscape::SelTrans::stretch(SPSelTransHandle const &/*handle*/, Geom::Point void Inkscape::SelTrans::scale(Geom::Point &/*pt*/, guint /*state*/) { - // E.g. scaling a perfectly vertical line in horizontal direction will not work, and will produce an identity affine - // Applying a transformation is useless, so we will not attempt to do so because this might trigger other bugs - // (see https://bugs.launchpad.net/inkscape/+bug/1256597) - // We check for this here and not in transform because identity transformations are perfectly fine for for example - // translations (e.g. a translation of (0,0), which occurs when snapping a point back to its original location) - - if (_absolute_affine.isIdentity()) { - return; - } - transform(_absolute_affine, Geom::Point(0, 0)); // we have already accounted for origin, so pass 0,0 } -- cgit v1.2.3 From 64fb7253a1d2771c4f844d1c2266a90f328895b5 Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Wed, 30 Jul 2014 22:47:29 +0200 Subject: Limit the number of paths to be used as snap targets, to keep Inkscape responsive in very complex drawings Fixed bugs: - https://launchpad.net/bugs/1348959 (bzr r13483) --- src/seltrans.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/seltrans.cpp') diff --git a/src/seltrans.cpp b/src/seltrans.cpp index 4b1a3a5fa..6b8cd19bb 100644 --- a/src/seltrans.cpp +++ b/src/seltrans.cpp @@ -304,6 +304,7 @@ void Inkscape::SelTrans::grab(Geom::Point const &p, gdouble x, gdouble y, bool s /* Snapping a huge number of nodes will take way too long, so limit the number of snappable nodes A typical user would rarely ever try to snap such a large number of nodes anyway, because (s)he would hardly be able to discern which node would be snapping */ + std::cout << "Warning: limit of 200 snap sources reached, some will be ignored" << std::endl; _snap_points.resize(200); // Unfortunately, by now we will have lost the font-baseline snappoints :-( } -- cgit v1.2.3