From 5ce8d034d9fe78f969629cfe65d1a2518f173ba9 Mon Sep 17 00:00:00 2001 From: cilix42 Date: Fri, 4 Jul 2008 11:24:40 +0000 Subject: [PATCH] Remove oncanvas_editable attribute for PointParams; use their internal shape settings for the knotholder handle --- src/live_effects/effect.cpp | 3 ++- src/live_effects/parameter/point.cpp | 6 ++---- src/live_effects/parameter/point.h | 3 +++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp index 73ba7387a..11e5b5048 100644 --- a/src/live_effects/effect.cpp +++ b/src/live_effects/effect.cpp @@ -423,7 +423,8 @@ Effect::addPointParamHandles(KnotHolder *knotholder, SPDesktop *desktop, SPItem if ((*p)->paramType() == POINT_PARAM) { PointParam *pparam = static_cast(*p); KnotHolderEntity *e = dynamic_cast(*p); - e->create(desktop, item, knotholder, pparam->handleTip()); + e->create(desktop, item, knotholder, pparam->handleTip(), + pparam->knotShape(), pparam->knotMode(), pparam->knotColor()); knotholder->add(e); } } diff --git a/src/live_effects/parameter/point.cpp b/src/live_effects/parameter/point.cpp index fa78ae6a4..220b618f7 100644 --- a/src/live_effects/parameter/point.cpp +++ b/src/live_effects/parameter/point.cpp @@ -35,11 +35,9 @@ PointParam::PointParam( const Glib::ustring& label, const Glib::ustring& tip, Effect* effect, const gchar *htip, Geom::Point default_value) : Geom::Point(default_value), Parameter(label, tip, key, wr, effect), defvalue(default_value) { - oncanvas_editable = true; - - knot_shape = SP_KNOT_SHAPE_SQUARE; + knot_shape = SP_KNOT_SHAPE_DIAMOND; knot_mode = SP_KNOT_MODE_XOR; - knot_color = 0x00ff0000; + knot_color = 0xffffff00; handle_tip = g_strdup(htip); } diff --git a/src/live_effects/parameter/point.h b/src/live_effects/parameter/point.h index bbd4d815e..4c0e6e356 100644 --- a/src/live_effects/parameter/point.h +++ b/src/live_effects/parameter/point.h @@ -52,6 +52,9 @@ public: virtual void param_transform_multiply(Geom::Matrix const& /*postmul*/, bool /*set*/); void set_oncanvas_looks(SPKnotShapeType shape, SPKnotModeType mode, guint32 color); + SPKnotShapeType knotShape() { return knot_shape; } + SPKnotModeType knotMode() { return knot_mode; } + guint32 knotColor() { return knot_color; } /* these are overloaded from KnotHolderEntity */ virtual void knot_set(NR::Point const &p, NR::Point const &origin, guint state); -- 2.30.2