diff options
| author | Diederik van Lierop <mail@diedenrezi.nl> | 2009-07-12 13:26:17 +0000 |
|---|---|---|
| committer | dvlierop2 <dvlierop2@users.sourceforge.net> | 2009-07-12 13:26:17 +0000 |
| commit | fbf31ab90352151b28784c45a9d3a7a061832c75 (patch) | |
| tree | dcafcdeb3ac3da02b801ad5d6dc246bdad643ca6 /src/widgets/toolbox.cpp | |
| parent | Adding a Liquid drawing Image effect and fixing a composite inconsistency in ... (diff) | |
| download | inkscape-fbf31ab90352151b28784c45a9d3a7a061832c75.tar.gz inkscape-fbf31ab90352151b28784c45a9d3a7a061832c75.zip | |
Don't allow the "proportion" parameter of a star to become NaN, because this will lead to a crash (i.e. give a continuity error in 2geom). This occured when snapping both handles of a star to the same grid intersection and subsequently drawing a new star
(bzr r8264)
Diffstat (limited to 'src/widgets/toolbox.cpp')
| -rw-r--r-- | src/widgets/toolbox.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp index 9ac009a84..21b0e97ac 100644 --- a/src/widgets/toolbox.cpp +++ b/src/widgets/toolbox.cpp @@ -2384,8 +2384,10 @@ static void sp_stb_proportion_value_changed( GtkAdjustment *adj, GObject *dataKl SPDesktop *desktop = (SPDesktop *) g_object_get_data( dataKludge, "desktop" ); if (sp_document_get_undo_sensitive(sp_desktop_document(desktop))) { - Inkscape::Preferences *prefs = Inkscape::Preferences::get(); - prefs->setDouble("/tools/shapes/star/proportion", adj->value); + if (!IS_NAN(adj->value)) { + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + prefs->setDouble("/tools/shapes/star/proportion", adj->value); + } } // quit if run by the attr_changed listener |
