From 3a3df97cf0a56279acd5ec986178600aad88870d Mon Sep 17 00:00:00 2001 From: buliabyak Date: Sun, 8 Nov 2009 00:50:58 +0000 Subject: [PATCH] patch by Krzysztof for 459811 --- src/sp-ellipse.cpp | 5 +++-- src/widgets/toolbox.cpp | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/sp-ellipse.cpp b/src/sp-ellipse.cpp index 769fa54fd..12ba0ed0e 100644 --- a/src/sp-ellipse.cpp +++ b/src/sp-ellipse.cpp @@ -893,10 +893,11 @@ sp_arc_position_set(SPArc *arc, gdouble x, gdouble y, gdouble rx, gdouble ry) ge->rx.computed = rx; ge->ry.computed = ry; Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + // those pref values are in degrees, while we want radians if (prefs->getDouble("/tools/shapes/arc/start", 0.0) != 0) - ge->start = prefs->getDouble("/tools/shapes/arc/start", 0.0); + ge->start = prefs->getDouble("/tools/shapes/arc/start", 0.0) * M_PI / 180; if (prefs->getDouble("/tools/shapes/arc/end", 0.0) != 0) - ge->end = prefs->getDouble("/tools/shapes/arc/end", 0.0); + ge->end = prefs->getDouble("/tools/shapes/arc/end", 0.0) * M_PI / 180; if (!prefs->getBool("/tools/shapes/arc/open")) ge->closed = 1; else diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp index 46ad08262..e0fe9bfd1 100644 --- a/src/widgets/toolbox.cpp +++ b/src/widgets/toolbox.cpp @@ -4929,7 +4929,7 @@ sp_arctb_startend_value_changed(GtkAdjustment *adj, GObject *tbl, gchar const *v if (sp_document_get_undo_sensitive(sp_desktop_document(desktop))) { Inkscape::Preferences *prefs = Inkscape::Preferences::get(); - prefs->setDouble(Glib::ustring("/tools/shapes/arc") + value_name, (adj->value * M_PI)/ 180); + prefs->setDouble(Glib::ustring("/tools/shapes/arc/") + value_name, adj->value); } // quit if run by the attr_changed listener -- 2.30.2