[gimp] app: GimpBrushEditor: fix display of spacing for normal brushes
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: GimpBrushEditor: fix display of spacing for normal brushes
- Date: Thu, 14 Mar 2013 21:54:09 +0000 (UTC)
commit b941986bbb655aa88574f5f28c3ca92a65d09de5
Author: Michael Natterer <mitch gimp org>
Date: Thu Mar 14 22:52:34 2013 +0100
app: GimpBrushEditor: fix display of spacing for normal brushes
it was doing *all* the UI settings only for generated brushes.
app/widgets/gimpbrusheditor.c | 25 +++++++++++++++----------
1 files changed, 15 insertions(+), 10 deletions(-)
---
diff --git a/app/widgets/gimpbrusheditor.c b/app/widgets/gimpbrusheditor.c
index 168b997..0355698 100644
--- a/app/widgets/gimpbrusheditor.c
+++ b/app/widgets/gimpbrusheditor.c
@@ -255,17 +255,21 @@ gimp_brush_editor_set_data (GimpDataEditor *editor,
gimp_view_set_viewable (GIMP_VIEW (editor->view), GIMP_VIEWABLE (data));
- if (editor->data && GIMP_IS_BRUSH_GENERATED (editor->data))
+ if (editor->data)
{
- GimpBrushGenerated *brush = GIMP_BRUSH_GENERATED (editor->data);
-
- shape = gimp_brush_generated_get_shape (brush);
- radius = gimp_brush_generated_get_radius (brush);
- spikes = gimp_brush_generated_get_spikes (brush);
- hardness = gimp_brush_generated_get_hardness (brush);
- ratio = gimp_brush_generated_get_aspect_ratio (brush);
- angle = gimp_brush_generated_get_angle (brush);
- spacing = gimp_brush_get_spacing (GIMP_BRUSH (brush));
+ spacing = gimp_brush_get_spacing (GIMP_BRUSH (editor->data));
+
+ if (GIMP_IS_BRUSH_GENERATED (editor->data))
+ {
+ GimpBrushGenerated *brush = GIMP_BRUSH_GENERATED (editor->data);
+
+ shape = gimp_brush_generated_get_shape (brush);
+ radius = gimp_brush_generated_get_radius (brush);
+ spikes = gimp_brush_generated_get_spikes (brush);
+ hardness = gimp_brush_generated_get_hardness (brush);
+ ratio = gimp_brush_generated_get_aspect_ratio (brush);
+ angle = gimp_brush_generated_get_angle (brush);
+ }
}
gtk_widget_set_sensitive (brush_editor->options_box,
@@ -273,6 +277,7 @@ gimp_brush_editor_set_data (GimpDataEditor *editor,
gimp_int_radio_group_set_active (GTK_RADIO_BUTTON (brush_editor->shape_group),
shape);
+
gtk_adjustment_set_value (brush_editor->radius_data, radius);
gtk_adjustment_set_value (brush_editor->spikes_data, spikes);
gtk_adjustment_set_value (brush_editor->hardness_data, hardness);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]