summaryrefslogtreecommitdiffstats
path: root/src/draw-anchor.cpp
diff options
context:
space:
mode:
authorMarkus Engel <markus.engel@tum.de>2013-11-12 01:48:38 +0000
committerMarkus Engel <markus.engel@tum.de>2013-11-12 01:48:38 +0000
commit0d56cd0b0b22de7385f173f0848f1ee71bdf5788 (patch)
tree2388a7841679186599ba85c269072947b456b2d1 /src/draw-anchor.cpp
parentFix bug in SPSwitch. (diff)
downloadinkscape-0d56cd0b0b22de7385f173f0848f1ee71bdf5788.tar.gz
inkscape-0d56cd0b0b22de7385f173f0848f1ee71bdf5788.zip
Clean up some tool related things.
(bzr r12795)
Diffstat (limited to 'src/draw-anchor.cpp')
-rw-r--r--src/draw-anchor.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/draw-anchor.cpp b/src/draw-anchor.cpp
index cd57b2461..00db936e1 100644
--- a/src/draw-anchor.cpp
+++ b/src/draw-anchor.cpp
@@ -37,8 +37,6 @@ SPDrawAnchor *sp_draw_anchor_new(Inkscape::UI::Tools::FreehandBase *dc, SPCurve
return NULL;
}
- SPDesktop *dt = SP_EVENT_CONTEXT_DESKTOP(dc);
-
SPDrawAnchor *a = g_new(SPDrawAnchor, 1);
a->dc = dc;
@@ -47,7 +45,7 @@ SPDrawAnchor *sp_draw_anchor_new(Inkscape::UI::Tools::FreehandBase *dc, SPCurve
a->start = start;
a->active = FALSE;
a->dp = delta;
- a->ctrl = ControlManager::getManager().createControl(sp_desktop_controls(dt), Inkscape::CTRL_TYPE_ANCHOR);
+ a->ctrl = ControlManager::getManager().createControl(sp_desktop_controls(&dc->getDesktop()), Inkscape::CTRL_TYPE_ANCHOR);
SP_CTRL(a->ctrl)->moveto(delta);
@@ -77,10 +75,9 @@ SPDrawAnchor *sp_draw_anchor_destroy(SPDrawAnchor *anchor)
*/
SPDrawAnchor *sp_draw_anchor_test(SPDrawAnchor *anchor, Geom::Point w, gboolean activate)
{
- SPDesktop *dt = SP_EVENT_CONTEXT_DESKTOP(anchor->dc);
SPCtrl *ctrl = SP_CTRL(anchor->ctrl);
- if ( activate && ( Geom::LInfty( w - dt->d2w(anchor->dp) ) <= (ctrl->box.width() / 2.0) ) ) {
+ if ( activate && ( Geom::LInfty( w - anchor->dc->getDesktop().d2w(anchor->dp) ) <= (ctrl->box.width() / 2.0) ) ) {
if (!anchor->active) {
g_object_set(anchor->ctrl, "fill_color", FILL_COLOR_MOUSEOVER, NULL);
anchor->active = TRUE;