summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMaximilian Albert <maximilian.albert@gmail.com>2008-06-18 22:30:12 +0000
committercilix42 <cilix42@users.sourceforge.net>2008-06-18 22:30:12 +0000
commitea3139bf1b60e2e92626d0b5badde56acaf766ed (patch)
treef1dae89ecde058c2ba06ca9fb8398fbca4142a0c /src
parentImprove comments and catch missing desktop in effect.cpp (diff)
downloadinkscape-ea3139bf1b60e2e92626d0b5badde56acaf766ed.tar.gz
inkscape-ea3139bf1b60e2e92626d0b5badde56acaf766ed.zip
Make knotholder members protected
(bzr r5994)
Diffstat (limited to 'src')
-rw-r--r--src/knotholder.h9
-rw-r--r--src/live_effects/parameter/pointparam-knotholder.cpp4
2 files changed, 8 insertions, 5 deletions
diff --git a/src/knotholder.h b/src/knotholder.h
index 14a139768..bd57776db 100644
--- a/src/knotholder.h
+++ b/src/knotholder.h
@@ -52,15 +52,18 @@ public:
void add_pattern_knotholder();
-//private:
+ const SPItem *getItem() { return item; }
+
+ friend class ShapeEditor;
+
+protected:
SPDesktop *desktop;
SPItem *item; // TODO: Remove this and keep the actual item (e.g., SPRect etc.) in the item-specific knotholders
+ Inkscape::XML::Node *repr; ///< repr of the item, for setting and releasing listeners.
std::list<KnotHolderEntity *> entity;
SPKnotHolderReleasedFunc released;
- Inkscape::XML::Node *repr; ///< repr of the item, for setting and releasing listeners.
-
gboolean local_change; ///< if true, no need to recreate knotholder if repr was changed.
};
diff --git a/src/live_effects/parameter/pointparam-knotholder.cpp b/src/live_effects/parameter/pointparam-knotholder.cpp
index 651054120..a8d357415 100644
--- a/src/live_effects/parameter/pointparam-knotholder.cpp
+++ b/src/live_effects/parameter/pointparam-knotholder.cpp
@@ -112,7 +112,7 @@ static void pointparam_knot_clicked_handler(SPKnot */*knot*/, guint /*state*/, P
*/
static void pointparam_knot_moved_handler(SPKnot */*knot*/, NR::Point const *p, guint /*state*/, PointParamKnotHolder *kh)
{
- NR::Matrix const i2d(from_2geom(sp_item_i2d_affine(kh->item)));
+ NR::Matrix const i2d(from_2geom(sp_item_i2d_affine(kh->getItem())));
NR::Point pos = (*p) / i2d;
Inkscape::SVGOStringStream os;
@@ -123,7 +123,7 @@ static void pointparam_knot_moved_handler(SPKnot */*knot*/, NR::Point const *p,
static void pointparam_knot_ungrabbed_handler(SPKnot *knot, unsigned int /*state*/, PointParamKnotHolder *kh)
{
- NR::Matrix const i2d(from_2geom(sp_item_i2d_affine(kh->item)));
+ NR::Matrix const i2d(from_2geom(sp_item_i2d_affine(kh->getItem())));
NR::Point pos = sp_knot_position(knot) / i2d;
Inkscape::SVGOStringStream os;