summaryrefslogtreecommitdiffstats
path: root/src/seltrans.cpp
diff options
context:
space:
mode:
authorDiederik van Lierop <mail@diedenrezi.nl>2007-09-10 21:15:56 +0000
committerdvlierop2 <dvlierop2@users.sourceforge.net>2007-09-10 21:15:56 +0000
commit9ed337ebdfeff1528af7efb8fb0973170ed68200 (patch)
treecf036b9761f6ffeb6a6a1a622871ce0288438bc8 /src/seltrans.cpp
parentadd missed paint type assignment, fixes crash with no fill/no stroke on selec... (diff)
downloadinkscape-9ed337ebdfeff1528af7efb8fb0973170ed68200.tar.gz
inkscape-9ed337ebdfeff1528af7efb8fb0973170ed68200.zip
Inkscape becomes unusable when trying to snap to the path of a traced bitmap or a text paragraph. Make it usable again by not snapping to text longer than 240 chars or paths containing more than 500 nodes. Snapping to more than one of such objects will still be very slow.
(bzr r3716)
Diffstat (limited to 'src/seltrans.cpp')
-rw-r--r--src/seltrans.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/seltrans.cpp b/src/seltrans.cpp
index d9566d091..c680e0cd3 100644
--- a/src/seltrans.cpp
+++ b/src/seltrans.cpp
@@ -1521,11 +1521,20 @@ void Inkscape::SelTrans::moveTo(NR::Point const &xy, guint state)
} else {
+ // Let's leave this timer code here for a while. I'll probably need it in the near future (Diederik van Lierop)
+ /* GTimeVal starttime;
+ GTimeVal endtime;
+ g_get_current_time(&starttime); */
+
/* Snap to things with no constraint */
s.push_back(m.freeSnapTranslation(Inkscape::Snapper::SNAPPOINT_BBOX,
_bbox_points, it, dxy));
s.push_back(m.freeSnapTranslation(Inkscape::Snapper::SNAPPOINT_NODE,
_snap_points, it, dxy));
+
+ /*g_get_current_time(&endtime);
+ double elapsed = ((((double)endtime.tv_sec - starttime.tv_sec) * G_USEC_PER_SEC + (endtime.tv_usec - starttime.tv_usec))) / 1000.0;
+ std::cout << "Time spent snapping: " << elapsed << std::endl; */
}
/* Pick one */