diff options
| author | bulia byak <buliabyak@gmail.com> | 2009-03-27 13:51:48 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2009-03-27 13:51:48 +0000 |
| commit | 7f6ee4c47bbd1c79a3a3ea9d9e1f0bcc16acc2e0 (patch) | |
| tree | ac3c6953fab33b3a810931704c5ef45fc8b5ce90 /src/sp-path.cpp | |
| parent | Polishing and compacting Metallized paint and renamed Comics liquid to Comics... (diff) | |
| download | inkscape-7f6ee4c47bbd1c79a3a3ea9d9e1f0bcc16acc2e0.tar.gz inkscape-7f6ee4c47bbd1c79a3a3ea9d9e1f0bcc16acc2e0.zip | |
add lpe names to path description
(bzr r7576)
Diffstat (limited to 'src/sp-path.cpp')
| -rw-r--r-- | src/sp-path.cpp | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/src/sp-path.cpp b/src/sp-path.cpp index 760f61e27..e570030dd 100644 --- a/src/sp-path.cpp +++ b/src/sp-path.cpp @@ -20,6 +20,11 @@ #include <glibmm/i18n.h> +#include "live_effects/effect.h" +#include "live_effects/lpeobject.h" +#include "live_effects/lpeobject-reference.h" +#include "sp-lpe-item.h" + #include <display/curve.h> #include <libnr/nr-matrix-fns.h> #include <2geom/pathvector.h> @@ -132,9 +137,24 @@ static gchar * sp_path_description(SPItem * item) { int count = sp_nodes_in_path(SP_PATH(item)); - if (sp_lpe_item_has_path_effect(SP_LPE_ITEM(item))) { - return g_strdup_printf(ngettext("<b>Path</b> (%i node, path effect)", - "<b>Path</b> (%i nodes, path effect)",count), count); + if (SP_IS_LPE_ITEM(item) && sp_lpe_item_has_path_effect(SP_LPE_ITEM(item))) { + + Glib::ustring s; + + PathEffectList effect_list = sp_lpe_item_get_effect_list(SP_LPE_ITEM(item)); + for (PathEffectList::iterator it = effect_list.begin(); it != effect_list.end(); it++) + { + LivePathEffectObject *lpeobj = (*it)->lpeobject; + if (!lpeobj || !lpeobj->get_lpe()) + break; + if (s.empty()) + s = lpeobj->get_lpe()->getName(); + else + s = s + ", " + lpeobj->get_lpe()->getName(); + } + + return g_strdup_printf(ngettext("<b>Path</b> (%i node, path effect: %s)", + "<b>Path</b> (%i nodes, path effect: %s)",count), count, s.c_str()); } else { return g_strdup_printf(ngettext("<b>Path</b> (%i node)", "<b>Path</b> (%i nodes)",count), count); |
