From f8a064e45c3d5571d27bbda9ffcfeacd22398b49 Mon Sep 17 00:00:00 2001 From: Markus Engel Date: Tue, 12 Nov 2013 01:51:18 +0100 Subject: Fix bug in SPSwitch. Fixed bugs: - https://launchpad.net/bugs/1249862 (bzr r12794) --- src/sp-item-group.h | 2 +- src/sp-switch.cpp | 1 + src/sp-switch.h | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src') 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); -- cgit v1.2.3