Code

patch by Krzysztof for 459811
authorbuliabyak <buliabyak@users.sourceforge.net>
Sun, 8 Nov 2009 00:50:58 +0000 (00:50 +0000)
committerbuliabyak <buliabyak@users.sourceforge.net>
Sun, 8 Nov 2009 00:50:58 +0000 (00:50 +0000)
src/sp-ellipse.cpp
src/widgets/toolbox.cpp

index 769fa54fd62ed41b84ac16d06b6b9251eebe0041..12ba0ed0e05f2bd54e3e23890b9b8dca12792ff7 100644 (file)
@@ -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
index 46ad08262b7ff12e899c4929e9ff9ac7752b4f01..e0fe9bfd100c681617843ce0c865ac83bb1e8075 100644 (file)
@@ -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