summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Engel <markus.engel@tum.de>2013-11-12 00:51:18 +0000
committerMarkus Engel <markus.engel@tum.de>2013-11-12 00:51:18 +0000
commitf8a064e45c3d5571d27bbda9ffcfeacd22398b49 (patch)
tree723cfa249e68bc7989bf4e3e59fc92f305aef718
parentremoved recursion to avoid problems on big documents (diff)
downloadinkscape-f8a064e45c3d5571d27bbda9ffcfeacd22398b49.tar.gz
inkscape-f8a064e45c3d5571d27bbda9ffcfeacd22398b49.zip
Fix bug in SPSwitch.
Fixed bugs: - https://launchpad.net/bugs/1249862 (bzr r12794)
-rw-r--r--src/sp-item-group.h2
-rw-r--r--src/sp-switch.cpp1
-rw-r--r--src/sp-switch.h2
3 files changed, 3 insertions, 2 deletions
diff --git a/src/sp-item-group.h b/src/sp-item-group.h
index deb80a641..2004a72b8 100644
--- a/src/sp-item-group.h
+++ b/src/sp-item-group.h
@@ -55,7 +55,7 @@ public:
void scaleChildItemsRec(Geom::Scale const &sc, Geom::Point const &p);
gint getItemCount() const;
- void _showChildren (Inkscape::Drawing &drawing, Inkscape::DrawingItem *ai, unsigned int key, unsigned int flags);
+ virtual void _showChildren (Inkscape::Drawing &drawing, Inkscape::DrawingItem *ai, unsigned int key, unsigned int flags);
private:
void _updateLayerMode(unsigned int display_key=0);
diff --git a/src/sp-switch.cpp b/src/sp-switch.cpp
index 5c88d7af8..b4841c0d0 100644
--- a/src/sp-switch.cpp
+++ b/src/sp-switch.cpp
@@ -40,6 +40,7 @@ SPSwitch::SPSwitch() : SPGroup() {
}
SPSwitch::~SPSwitch() {
+ _releaseLastItem(_cached_item);
}
SPObject *SPSwitch::_evaluateFirst() {
diff --git a/src/sp-switch.h b/src/sp-switch.h
index 3ccc9e3b7..c35982860 100644
--- a/src/sp-switch.h
+++ b/src/sp-switch.h
@@ -28,7 +28,7 @@ public:
void resetChildEvaluated() { _reevaluate(); }
GSList *_childList(bool add_ref, SPObject::Action action);
- void _showChildren (Inkscape::Drawing &drawing, Inkscape::DrawingItem *ai, unsigned int key, unsigned int flags);
+ virtual void _showChildren (Inkscape::Drawing &drawing, Inkscape::DrawingItem *ai, unsigned int key, unsigned int flags);
SPObject *_evaluateFirst();
void _reevaluate(bool add_to_arena = false);