Fix for bug #459811 - can't switch ellipse mode

View: New views
3 Messages — Rating Filter:   Alert me  

Fix for bug #459811 - can't switch ellipse mode

by Krzysztof Kosiński :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello
Attached is a fix for bug #459811. The case was a typo (missing slash)
in toolbox.cpp which I probably made when refactoring preferences
code. Please commit.
Regards, Krzysztof Kosiński

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Inkscape-devel mailing list
Inkscape-devel@...
https://lists.sourceforge.net/lists/listinfo/inkscape-devel

Re: Fix for bug #459811 - can't switch ellipse mode

by ~suv-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 30/10/09 17:26, Krzysztof Kosiński wrote:
> Attached is a fix for bug #459811. The case was a typo (missing
> slash) in toolbox.cpp which I probably made when refactoring
> preferences code. Please commit.

Thank you for looking into this!

To the release warden: this is an important fix for the preferences
migration. I was just about to add this comment to bug #437929:

> 3) don't migrate the start/end values within the eventcontext
>    id="arc".
>
> See bug #459811: If I am not mistaken this could potentially lock the
> ellipse tool in 0.47 to always creating (minuscule or invisible) arcs
> with no possibility for the user to reset the values permanently
> except by manually editing the preferences file.

~suv

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Inkscape-devel mailing list
Inkscape-devel@...
https://lists.sourceforge.net/lists/listinfo/inkscape-devel

Parent Message unknown Re: Fix for bug #459811 - can't switch ellipse mode

by Krzysztof Kosiński :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

(forwarding unintended off-list mail... ARGH)

This should fix both issues. /tools/shapes/arc/* can be left unchanged
from previous versions now.

Regards, Krzysztof

[ellipse-typo-v2.patch]

Index: src/sp-ellipse.cpp
===================================================================
--- src/sp-ellipse.cpp (revision 22539)
+++ src/sp-ellipse.cpp (working copy)
@@ -893,10 +893,11 @@
     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: src/widgets/toolbox.cpp
===================================================================
--- src/widgets/toolbox.cpp (revision 22539)
+++ src/widgets/toolbox.cpp (working copy)
@@ -4929,7 +4929,7 @@
 
     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


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Inkscape-devel mailing list
Inkscape-devel@...
https://lists.sourceforge.net/lists/listinfo/inkscape-devel