diff --git a/ChangeLog b/ChangeLog index 9eb4a0033a..390f9a20f4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-08-12 Sven Neumann + + * app/widgets/gimphistogrameditor.c + (gimp_histogram_editor_frozen_update): don't do the background + histogram unless the histogram view is actually visible. + 2008-08-12 Sven Neumann * app/paint/gimppaintcore.c (gimp_paint_core_start): use diff --git a/app/widgets/gimphistogrameditor.c b/app/widgets/gimphistogrameditor.c index 20b2a81343..09114ed3eb 100644 --- a/app/widgets/gimphistogrameditor.c +++ b/app/widgets/gimphistogrameditor.c @@ -391,7 +391,13 @@ gimp_histogram_editor_frozen_update (GimpHistogramEditor *editor, if (gimp_viewable_preview_is_frozen (GIMP_VIEWABLE (editor->drawable))) { - if (! editor->bg_histogram) + /* Only do the background histogram if the histogram is visible. + * This is a workaround for the fact that recalculating the + * histogram is expensive and that it is only validated when it + * is shown. So don't slow down painting by doing something that + * is not even seen by the user. + */ + if (! editor->bg_histogram && GTK_WIDGET_DRAWABLE (editor)) { if (gimp_histogram_editor_validate (editor)) editor->bg_histogram = gimp_histogram_duplicate (editor->histogram);