summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/knot-holder-entity.h8
-rw-r--r--src/knotholder.cpp8
2 files changed, 1 insertions, 15 deletions
diff --git a/src/knot-holder-entity.h b/src/knot-holder-entity.h
index f1513779a..ec936d464 100644
--- a/src/knot-holder-entity.h
+++ b/src/knot-holder-entity.h
@@ -48,12 +48,6 @@ public:
SPKnotModeType mode = SP_KNOT_MODE_XOR,
guint32 color = 0xffffff00);
- /* derived classes used for LPE knotholder handles use this to indicate that they
- must not be deleted when a knotholder is destroyed */
- // TODO: it would be nice to ditch this but then we need to dynamically create instances of different
- // KnotHolderEntity classes in Effect::addKnotHolderEntities. How to do this???
- virtual bool isDeletable() { return true; }
-
/* the get/set/click handlers are virtual functions; each handler class for a knot
should be derived from KnotHolderEntity and override these functions */
virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state) = 0;
@@ -93,8 +87,6 @@ public:
LPEKnotHolderEntity(Inkscape::LivePathEffect::Effect *effect) : _effect(effect) {};
protected:
Inkscape::LivePathEffect::Effect *_effect;
-private:
- virtual bool isDeletable() { return false; }
};
/* pattern manipulation */
diff --git a/src/knotholder.cpp b/src/knotholder.cpp
index 91013ad2e..513c02834 100644
--- a/src/knotholder.cpp
+++ b/src/knotholder.cpp
@@ -68,13 +68,7 @@ KnotHolder::~KnotHolder() {
g_object_unref(G_OBJECT(item));
for(std::list<KnotHolderEntity *>::iterator i = entity.begin(); i != entity.end(); ++i) {
KnotHolderEntity* e = (*i);
- if (e->isDeletable()) {
- delete (*i);
- } else {
- // we must not delete the entity (since it's attached to an LPE parameter),
- // but the handle should be destroyed
- g_object_unref(e->knot);
- }
+ delete (*i);
(*i) = NULL;
}
entity.clear(); // is this necessary?