summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a7c3c7a)
raw | patch | inline | side by side (parent: a7c3c7a)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Fri, 27 Mar 2009 13:51:48 +0000 (13:51 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Fri, 27 Mar 2009 13:51:48 +0000 (13:51 +0000) |
src/sp-path.cpp | patch | blob | history |
diff --git a/src/sp-path.cpp b/src/sp-path.cpp
index 760f61e27f56550a7fb7ffba02909264950240e8..e570030dd439869b1a8dcd27d5187e7561672a46 100644 (file)
--- a/src/sp-path.cpp
+++ b/src/sp-path.cpp
#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>
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);