diff options
| author | Sebastian Wüst <sebi@timewaster.de> | 2013-10-20 15:32:08 +0000 |
|---|---|---|
| committer | Sebastian Wüst <sebi@timewaster.de> | 2013-10-20 15:32:08 +0000 |
| commit | 82908f949129e1fcbf62002799ee7b1b77986eed (patch) | |
| tree | c02098dd7720cdf424f2793ecd3ddac2ea86b969 /src/knotholder.cpp | |
| parent | changed text (diff) | |
| parent | Fix build errors with clang 3.3 and c++11 enabled. (diff) | |
| download | inkscape-82908f949129e1fcbf62002799ee7b1b77986eed.tar.gz inkscape-82908f949129e1fcbf62002799ee7b1b77986eed.zip | |
merge from trunk
(bzr r12417.1.24)
Diffstat (limited to 'src/knotholder.cpp')
| -rw-r--r-- | src/knotholder.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/knotholder.cpp b/src/knotholder.cpp index a1ee3082b..7129348c2 100644 --- a/src/knotholder.cpp +++ b/src/knotholder.cpp @@ -63,13 +63,16 @@ KnotHolder::KnotHolder(SPDesktop *desktop, SPItem *item, SPKnotHolderReleasedFun g_print ("Error! Throw an exception, please!\n"); } - g_object_ref(G_OBJECT(item)); // TODO: is this still needed after C++-ification? + //g_object_ref(G_OBJECT(item)); // TODO: is this still needed after C++-ification? + sp_object_ref(item); sizeUpdatedConn = ControlManager::getManager().connectCtrlSizeChanged(sigc::mem_fun(*this, &KnotHolder::updateControlSizes)); } KnotHolder::~KnotHolder() { - g_object_unref(G_OBJECT(item)); + //g_object_unref(G_OBJECT(item)); + sp_object_unref(item); + for (std::list<KnotHolderEntity *>::iterator i = entity.begin(); i != entity.end(); ++i) { delete (*i); @@ -128,7 +131,7 @@ KnotHolder::knot_clicked_handler(SPKnot *knot, guint state) } if (SP_IS_SHAPE(saved_item)) { - SP_SHAPE(saved_item)->setShape(); + SP_SHAPE(saved_item)->set_shape(); } knot_holder->update_knots(); @@ -177,7 +180,7 @@ KnotHolder::knot_moved_handler(SPKnot *knot, Geom::Point const &p, guint state) } if (SP_IS_SHAPE (item)) { - SP_SHAPE (item)->setShape(); + SP_SHAPE (item)->set_shape(); } this->update_knots(); @@ -206,7 +209,7 @@ KnotHolder::knot_ungrabbed_handler(SPKnot */*knot*/) // This writes all parameters to SVG. Is this sufficiently efficient or should we only // write the ones that were changed? - Inkscape::LivePathEffect::Effect *lpe = sp_lpe_item_get_current_lpe(SP_LPE_ITEM(object)); + Inkscape::LivePathEffect::Effect *lpe = SP_LPE_ITEM(object)->getCurrentLPE(); if (lpe) { LivePathEffectObject *lpeobj = lpe->getLPEObj(); lpeobj->updateRepr(); @@ -239,7 +242,7 @@ KnotHolder::knot_ungrabbed_handler(SPKnot */*knot*/) void KnotHolder::add(KnotHolderEntity *e) { - g_message("Adding a knot at %p", e); + // g_message("Adding a knot at %p", e); entity.push_back(e); updateControlSizes(); } |
