diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2014-06-24 17:26:21 +0000 |
|---|---|---|
| committer | Johan B. C. Engelen <j.b.c.engelen@alumnus.utwente.nl> | 2014-06-24 17:26:21 +0000 |
| commit | e6530013ca6fa356b62bdcd0d2ff158617fe0a9f (patch) | |
| tree | 2456a39e2ddaeaaaeb21da772e1e3cb1fcf447d3 /src/sp-lpe-item.cpp | |
| parent | Fix for ungrouping/non-LPEItem masks (diff) | |
| download | inkscape-e6530013ca6fa356b62bdcd0d2ff158617fe0a9f.tar.gz inkscape-e6530013ca6fa356b62bdcd0d2ff158617fe0a9f.zip | |
fix bug introduced in rev. 13403 (merge with trunk)
(bzr r13341.1.67)
Diffstat (limited to 'src/sp-lpe-item.cpp')
| -rw-r--r-- | src/sp-lpe-item.cpp | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/src/sp-lpe-item.cpp b/src/sp-lpe-item.cpp index 87c9ad6fd..9e2eff6bb 100644 --- a/src/sp-lpe-item.cpp +++ b/src/sp-lpe-item.cpp @@ -50,6 +50,8 @@ #include <algorithm> /* LPEItem base class */ +static void sp_lpe_item_enable_path_effects(SPLPEItem *lpeitem, bool enable); + static void lpeobject_ref_modified(SPObject *href, guint flags, SPLPEItem *lpeitem); static void sp_lpe_item_create_original_path_recursive(SPLPEItem *lpeitem); @@ -113,7 +115,7 @@ void SPLPEItem::set(unsigned int key, gchar const* value) { this->current_path_effect = NULL; // Disable the path effects while populating the LPE list - enablePathEffects(false); + sp_lpe_item_enable_path_effects(this, false); // disconnect all modified listeners: for ( std::list<sigc::connection>::iterator mod_it = this->lpe_modified_connection_list->begin(); @@ -166,7 +168,7 @@ void SPLPEItem::set(unsigned int key, gchar const* value) { } } - enablePathEffects(true); + sp_lpe_item_enable_path_effects(this, true); } break; @@ -421,7 +423,7 @@ void SPLPEItem::addPathEffect(gchar *value, bool reset) sp_lpe_item_update_patheffect(this, false, true); // Disable the path effects while preparing the new lpe - enablePathEffects(false); + sp_lpe_item_enable_path_effects(this, false); // Add the new reference to the list of LPE references HRefList hreflist; @@ -458,7 +460,7 @@ void SPLPEItem::addPathEffect(gchar *value, bool reset) } //Enable the path effects now that everything is ready to apply the new path effect - enablePathEffects(true); + sp_lpe_item_enable_path_effects(this, true); // Apply the path effect sp_lpe_item_update_patheffect(this, true, true); @@ -970,6 +972,24 @@ bool SPLPEItem::forkPathEffectsIfNecessary(unsigned int nr_of_allowed_users) return forked; } +// Enable or disable the path effects of the item. +// The counter allows nested calls +static void sp_lpe_item_enable_path_effects(SPLPEItem *lpeitem, bool enable) +{ + if (enable) { + lpeitem->path_effects_enabled++; + } + else { + lpeitem->path_effects_enabled--; + } +} + +// Are the path effects enabled on this item ? +bool SPLPEItem::pathEffectsEnabled() const +{ + return path_effects_enabled > 0; +} + /* Local Variables: mode:c++ |
