summaryrefslogtreecommitdiffstats
path: root/src/object-snapper.cpp
diff options
context:
space:
mode:
authorDiederik van Lierop <mail@diedenrezi.nl>2014-07-30 20:47:29 +0000
committerDiederik van Lierop <mail@diedenrezi.nl>2014-07-30 20:47:29 +0000
commit64fb7253a1d2771c4f844d1c2266a90f328895b5 (patch)
tree70071046513af647915b877245667114f2d42c31 /src/object-snapper.cpp
parentFix for 1346972 (freehand shape mode should pick stroke width from tool's act... (diff)
downloadinkscape-64fb7253a1d2771c4f844d1c2266a90f328895b5.tar.gz
inkscape-64fb7253a1d2771c4f844d1c2266a90f328895b5.zip
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)
Diffstat (limited to 'src/object-snapper.cpp')
-rw-r--r--src/object-snapper.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/object-snapper.cpp b/src/object-snapper.cpp
index 3b8956bc8..0f7aa6368 100644
--- a/src/object-snapper.cpp
+++ b/src/object-snapper.cpp
@@ -147,6 +147,10 @@ void Inkscape::ObjectSnapper::_findCandidates(SPObject* parent,
// For debugging: print the id of the candidate to the console
// SPObject *obj = (SPObject*)item;
// std::cout << "Snap candidate added: " << obj->getId() << std::endl;
+ if (_candidates->size() > 200) { // This makes Inkscape crawl already
+ std::cout << "Warning: limit of 200 snap target paths reached, some will be ignored" << std::endl;
+ break;
+ }
}
}
}