diff options
| author | bulia byak <buliabyak@gmail.com> | 2009-03-26 22:58:37 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2009-03-26 22:58:37 +0000 |
| commit | c4e178497c60228e4c0530f9fc803576e4aaea3e (patch) | |
| tree | dd9a9c7405757be44b7b33055d1ab60399901ad4 /src | |
| parent | Polishing some Bevels and Ridges (diff) | |
| download | inkscape-c4e178497c60228e4c0530f9fc803576e4aaea3e.tar.gz inkscape-c4e178497c60228e4c0530f9fc803576e4aaea3e.zip | |
sp_lpe_item_has_path_effect now returns false if one of the effects in the stack is invalid or unsupported, in which case LPE stack is disabled
(bzr r7566)
Diffstat (limited to 'src')
| -rw-r--r-- | src/sp-lpe-item.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/sp-lpe-item.cpp b/src/sp-lpe-item.cpp index f1e4c96c2..90e9b2d6d 100644 --- a/src/sp-lpe-item.cpp +++ b/src/sp-lpe-item.cpp @@ -601,7 +601,19 @@ void sp_lpe_item_up_current_path_effect(SPLPEItem *lpeitem) bool sp_lpe_item_has_path_effect(SPLPEItem *lpeitem) { - return !lpeitem->path_effect_list->empty(); + if (lpeitem->path_effect_list->empty()) + return false; + + // go through the list; if some are unknown or invalid, we are not an LPE item! + PathEffectList effect_list = sp_lpe_item_get_effect_list(lpeitem); + for (PathEffectList::iterator it = effect_list.begin(); it != effect_list.end(); it++) + { + LivePathEffectObject *lpeobj = (*it)->lpeobject; + if (!lpeobj || !lpeobj->get_lpe()) + return false; + } + + return true; } bool sp_lpe_item_has_path_effect_recursive(SPLPEItem *lpeitem) |
