summaryrefslogtreecommitdiffstats
path: root/src/spiral-context.cpp
diff options
context:
space:
mode:
authorAndrew Higginson <at.higginson@gmail.com>2011-12-27 21:04:47 +0000
committerAndrew <at.higginson@gmail.com>2011-12-27 21:04:47 +0000
commit80960b623a99aae1402ab651b2974ef544ed3b03 (patch)
treeba49d42c2789e9e11f805e2d5263e10f9fedeef8 /src/spiral-context.cpp
parenttry to fix bug (diff)
parentGDL: Cherry-pick upstream patch 73852 (2011-03-23) - Add missing return value. (diff)
downloadinkscape-80960b623a99aae1402ab651b2974ef544ed3b03.tar.gz
inkscape-80960b623a99aae1402ab651b2974ef544ed3b03.zip
merged with trunk so I can build again...
(bzr r10092.1.36)
Diffstat (limited to 'src/spiral-context.cpp')
-rw-r--r--src/spiral-context.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/spiral-context.cpp b/src/spiral-context.cpp
index 754885192..64eedf3f9 100644
--- a/src/spiral-context.cpp
+++ b/src/spiral-context.cpp
@@ -53,13 +53,13 @@ static void sp_spiral_context_set(SPEventContext *ec, Inkscape::Preferences::Ent
static gint sp_spiral_context_root_handler(SPEventContext *event_context, GdkEvent *event);
-static void sp_spiral_drag(SPSpiralContext *sc, Geom::Point p, guint state);
+static void sp_spiral_drag(SPSpiralContext *sc, Geom::Point const &p, guint state);
static void sp_spiral_finish(SPSpiralContext *sc);
static void sp_spiral_cancel(SPSpiralContext *sc);
static SPEventContextClass *parent_class;
-GtkType
+GType
sp_spiral_context_get_type()
{
static GType type = 0;
@@ -157,11 +157,10 @@ sp_spiral_context_dispose(GObject *object)
}
/**
-\brief Callback that processes the "changed" signal on the selection;
-destroys old and creates new knotholder
-*/
-void
-sp_spiral_context_selection_changed(Inkscape::Selection *selection, gpointer data)
+ * Callback that processes the "changed" signal on the selection;
+ * destroys old and creates new knotholder.
+ */
+void sp_spiral_context_selection_changed(Inkscape::Selection *selection, gpointer data)
{
SPSpiralContext *sc = SP_SPIRAL_CONTEXT(data);
SPEventContext *ec = SP_EVENT_CONTEXT(sc);
@@ -275,7 +274,7 @@ sp_spiral_context_root_handler(SPEventContext *event_context, GdkEvent *event)
m.setup(desktop, true, sc->item);
m.freeSnapReturnByRef(motion_dt, Inkscape::SNAPSOURCE_NODE_HANDLE);
m.unSetup();
- sp_spiral_drag(sc, from_2geom(motion_dt), event->motion.state);
+ sp_spiral_drag(sc, motion_dt, event->motion.state);
gobble_motion_events(GDK_BUTTON1_MASK);
@@ -399,7 +398,7 @@ sp_spiral_context_root_handler(SPEventContext *event_context, GdkEvent *event)
return ret;
}
-static void sp_spiral_drag(SPSpiralContext *sc, Geom::Point p, guint state)
+static void sp_spiral_drag(SPSpiralContext *sc, Geom::Point const &p, guint state)
{
SPDesktop *desktop = SP_EVENT_CONTEXT(sc)->desktop;
@@ -430,7 +429,7 @@ static void sp_spiral_drag(SPSpiralContext *sc, Geom::Point p, guint state)
SnapManager &m = desktop->namedview->snap_manager;
m.setup(desktop, true, sc->item);
- Geom::Point pt2g = to_2geom(p);
+ Geom::Point pt2g = p;
m.freeSnapReturnByRef(pt2g, Inkscape::SNAPSOURCE_NODE_HANDLE);
m.unSetup();
Geom::Point const p0 = desktop->dt2doc(sc->center);