diff options
| author | Maximilian Albert <maximilian.albert@gmail.com> | 2008-07-29 14:51:39 +0000 |
|---|---|---|
| committer | cilix42 <cilix42@users.sourceforge.net> | 2008-07-29 14:51:39 +0000 |
| commit | 78b970a0a036f78cfd491553b49ffa00214f7a64 (patch) | |
| tree | 18e737c865450e590297c086a8fc17a0ede8d833 /src/knotholder.cpp | |
| parent | Remove superfluous functions (diff) | |
| download | inkscape-78b970a0a036f78cfd491553b49ffa00214f7a64.tar.gz inkscape-78b970a0a036f78cfd491553b49ffa00214f7a64.zip | |
Rename isLPEParam() to isDeletable(), create new class LPEKnotHolderEntity and make inheritance from it a bit less clumsy
(bzr r6448)
Diffstat (limited to 'src/knotholder.cpp')
| -rw-r--r-- | src/knotholder.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/knotholder.cpp b/src/knotholder.cpp index f2bbbfbc0..ae9737b32 100644 --- a/src/knotholder.cpp +++ b/src/knotholder.cpp @@ -60,17 +60,16 @@ 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->isLPEParam()) { - // knotholder entity may be deleted + if (e->isDeletable()) { delete (*i); } else { - // we must not delete the entity since it's an LPE parameter, + // 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); } (*i) = NULL; } - entity.clear(); // this shouldn't be necessary, though + entity.clear(); // is this necessary? } /** |
