summaryrefslogtreecommitdiffstats
path: root/src/knot-holder-entity.cpp
diff options
context:
space:
mode:
authorDenis Declara <declara91@gmail.com>2012-05-05 13:32:42 +0000
committerDenis Declara <declara91@gmail.com>2012-05-05 13:32:42 +0000
commitaeb9c1bde66de096910757abb17dedb94ad74207 (patch)
treec0adf97685b0fa8af1553b14d20601f280492762 /src/knot-holder-entity.cpp
parentFixed some math, so that the objects now line up correctly (diff)
parentAdding checks to prevent null pointer dereferences (diff)
downloadinkscape-aeb9c1bde66de096910757abb17dedb94ad74207.tar.gz
inkscape-aeb9c1bde66de096910757abb17dedb94ad74207.zip
Trunk merge
(bzr r11073.1.29)
Diffstat (limited to 'src/knot-holder-entity.cpp')
-rw-r--r--src/knot-holder-entity.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/knot-holder-entity.cpp b/src/knot-holder-entity.cpp
index c556195d6..9f072d8f5 100644
--- a/src/knot-holder-entity.cpp
+++ b/src/knot-holder-entity.cpp
@@ -29,9 +29,9 @@
int KnotHolderEntity::counter = 0;
-void
-KnotHolderEntity::create(SPDesktop *desktop, SPItem *item, KnotHolder *parent, const gchar *tip,
- SPKnotShapeType shape, SPKnotModeType mode, guint32 color)
+void KnotHolderEntity::create(SPDesktop *desktop, SPItem *item, KnotHolder *parent, Inkscape::ControlType type,
+ const gchar *tip,
+ SPKnotShapeType shape, SPKnotModeType mode, guint32 color)
{
knot = sp_knot_new(desktop, tip);
@@ -41,11 +41,14 @@ KnotHolderEntity::create(SPDesktop *desktop, SPItem *item, KnotHolder *parent, c
my_counter = KnotHolderEntity::counter++;
- g_object_set(G_OBJECT (knot->item), "shape", shape, NULL);
- g_object_set(G_OBJECT (knot->item), "mode", mode, NULL);
+ g_object_set(G_OBJECT(knot->item), "shape", shape, NULL);
+ g_object_set(G_OBJECT(knot->item), "mode", mode, NULL);
+
+ // TODO base more appearance from this type instead of passing in arbitrary values.
+ knot->item->ctrlType = type;
knot->fill [SP_KNOT_STATE_NORMAL] = color;
- g_object_set (G_OBJECT (knot->item), "fill_color", color, NULL);
+ g_object_set (G_OBJECT(knot->item), "fill_color", color, NULL);
update_knot();
sp_knot_show(knot);