Code

Fix for LP #168959 as per John Cliff's 'patch' in the bug tracker
authorcilix42 <cilix42@users.sourceforge.net>
Sat, 2 Feb 2008 16:51:04 +0000 (16:51 +0000)
committercilix42 <cilix42@users.sourceforge.net>
Sat, 2 Feb 2008 16:51:04 +0000 (16:51 +0000)
src/widgets/toolbox.cpp

index 31720b3e842c15fab32b85ebdb88b924a48a2879..fcf43728801013084ad7a27f8bcaf9b9bd7d8b24 100644 (file)
@@ -1717,6 +1717,9 @@ static void star_tb_event_attr_changed(Inkscape::XML::Node *repr, gchar const *n
 
     GtkAdjustment *adj = 0;
 
+    gchar const *flatsidedstr = prefs_get_string_attribute( "tools.shapes.star", "isflatsided" );
+    bool isFlatSided = flatsidedstr ? (strcmp(flatsidedstr, "false") != 0) : true;
+
     if (!strcmp(name, "inkscape:randomized")) {
         adj = GTK_ADJUSTMENT( gtk_object_get_data(GTK_OBJECT(tbl), "randomized") );
         gtk_adjustment_set_value(adj, sp_repr_get_double_attribute(repr, "inkscape:randomized", 0.0));
@@ -1734,7 +1737,7 @@ static void star_tb_event_attr_changed(Inkscape::XML::Node *repr, gchar const *n
             ege_select_one_action_set_active( flat_action, 0 );
             gtk_action_set_sensitive( prop_action, FALSE );
         }
-    } else if (!strcmp(name, "sodipodi:r1") || !strcmp(name, "sodipodi:r2")) {
+    } else if ((!strcmp(name, "sodipodi:r1") || !strcmp(name, "sodipodi:r2")) && (!isFlatSided) ) {
         adj = (GtkAdjustment*)gtk_object_get_data(GTK_OBJECT(tbl), "proportion");
         gdouble r1 = sp_repr_get_double_attribute(repr, "sodipodi:r1", 1.0);
         gdouble r2 = sp_repr_get_double_attribute(repr, "sodipodi:r2", 1.0);