diff options
| author | Denis Declara <declara91@gmail.com> | 2012-05-05 13:32:42 +0000 |
|---|---|---|
| committer | Denis Declara <declara91@gmail.com> | 2012-05-05 13:32:42 +0000 |
| commit | aeb9c1bde66de096910757abb17dedb94ad74207 (patch) | |
| tree | c0adf97685b0fa8af1553b14d20601f280492762 /src/knot-holder-entity.cpp | |
| parent | Fixed some math, so that the objects now line up correctly (diff) | |
| parent | Adding checks to prevent null pointer dereferences (diff) | |
| download | inkscape-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.cpp | 15 |
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); |
