summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7934711)
raw | patch | inline | side by side (parent: 7934711)
author | cilix42 <cilix42@users.sourceforge.net> | |
Mon, 18 Aug 2008 00:46:44 +0000 (00:46 +0000) | ||
committer | cilix42 <cilix42@users.sourceforge.net> | |
Mon, 18 Aug 2008 00:46:44 +0000 (00:46 +0000) |
src/lpe-tool-context.cpp | patch | blob | history | |
src/widgets/toolbox.cpp | patch | blob | history |
index f7b0091ec4682c91abc9c808591400ff4a49cabf..0b3fb25bf01d6c7739eab44a3f129c980dfdb401 100644 (file)
--- a/src/lpe-tool-context.cpp
+++ b/src/lpe-tool-context.cpp
@@ -167,6 +167,7 @@ destroys old and creates new nodepath and reassigns listeners to the new selecte
void
sp_lpetool_context_selection_changed(Inkscape::Selection *selection, gpointer data)
{
+ g_print ("sp_lpetool_context_selection_changed()\n");
SPLPEToolContext *lc = SP_LPETOOL_CONTEXT(data);
// TODO: update ShapeEditorsCollective instead
int lpetool_item_has_construction(SPLPEToolContext *lc, SPItem *item)
{
if (!SP_IS_LPE_ITEM(item)) {
+ g_print ("item is not LPEItem; returning -1\n");
return -1;
}
Inkscape::LivePathEffect::Effect* lpe = sp_lpe_item_get_current_lpe(SP_LPE_ITEM(item));
if (!lpe) {
+ g_print ("no valid construction; returning -1\n");
return -1;
}
+ g_print ("returning construction %d\n", lpetool_mode_to_index(lpe->effectType()));
return lpetool_mode_to_index(lpe->effectType());
}
index eefc5de87fde8c974cc81d6171a5903055de3ebe..5676529c3c81e19dd9fe2a86083e092d98c72da9 100644 (file)
--- a/src/widgets/toolbox.cpp
+++ b/src/widgets/toolbox.cpp
sp_lpetool_toolbox_sel_changed(Inkscape::Selection *selection, GObject *tbl)
{
using namespace Inkscape::LivePathEffect;
+ g_print ("sp_lpetool_toolbox_sel_changed()");
{
GtkAction* w = GTK_ACTION(g_object_get_data(tbl, "lpetool_line_segment_action"));
SPItem *item = selection->singleItem();
@@ -4843,22 +4844,26 @@ sp_lpetool_toolbox_sel_changed(Inkscape::Selection *selection, GObject *tbl)
SPLPEItem *lpeitem = SP_LPE_ITEM(item);
Effect* lpe = sp_lpe_item_get_current_lpe(lpeitem);
if (lpe && lpe->effectType() == LINE_SEGMENT) {
+ g_print (" - item with line segment LPE found\n");
LPELineSegment *lpels = static_cast<LPELineSegment*>(lpe);
g_object_set_data(tbl, "currentlpe", lpe);
g_object_set_data(tbl, "currentlpeitem", lpeitem);
gtk_action_set_sensitive(w, TRUE);
ege_select_one_action_set_active(act, lpels->end_type->get_value());
} else {
+ g_print (" - unsetting item\n");
g_object_set_data(tbl, "currentlpe", NULL);
g_object_set_data(tbl, "currentlpeitem", NULL);
gtk_action_set_sensitive(w, FALSE);
}
} else {
+ g_print (" - unsetting item\n");
g_object_set_data(tbl, "currentlpe", NULL);
g_object_set_data(tbl, "currentlpeitem", NULL);
gtk_action_set_sensitive(w, FALSE);
}
}
+ g_print ("\n");
}
static void
static void
sp_lpetool_change_line_segment_type(EgeSelectOneAction* act, GObject* tbl) {
+ g_print ("sp_lpetool_change_line_segment_type()\n");
using namespace Inkscape::LivePathEffect;
// quit if run by the attr_changed listener
LPELineSegment *lpe = static_cast<LPELineSegment *>(g_object_get_data(tbl, "currentlpe"));
SPLPEItem *lpeitem = static_cast<SPLPEItem *>(g_object_get_data(tbl, "currentlpeitem"));
- if (lpe) {
+ if (!lpeitem) {
+ g_print ("no lpeitem!\n");
+ } else {
+ g_print ("lpeitem found\n");
+ }
+ if (!lpe) {
+ g_print ("no LPE!\n");
+ } else {
+ g_print ("LPE found. Adjusting line segment type\n");
SPLPEItem *lpeitem = static_cast<SPLPEItem *>(g_object_get_data(tbl, "currentlpeitem"));
lpe->end_type.param_set_value(static_cast<Inkscape::LivePathEffect::EndType>(ege_select_one_action_get_active(act)));
sp_lpe_item_update_patheffect(lpeitem, true, true);