fix rendering for n_columns == 1 (bug #369368).

2006-11-02  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpviewrendererpalette.c
	(gimp_view_renderer_palette_render): fix rendering for
	n_columns == 1 (bug #369368).
This commit is contained in:
Michael Natterer 2006-11-02 12:18:20 +00:00 committed by Michael Natterer
parent b8742dc4ba
commit 8e22e7c764
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2006-11-02 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpviewrendererpalette.c
(gimp_view_renderer_palette_render): fix rendering for
n_columns == 1 (bug #369368).
2006-11-02 Sven Neumann <sven@gimp.org>
* plug-ins/common/lcms.c: improved wording.

View File

@ -97,7 +97,7 @@ gimp_view_renderer_palette_render (GimpViewRenderer *renderer,
if (renderpal->cell_size > 0)
{
if (palette->n_columns > 1)
if (palette->n_columns > 0)
cell_width = MAX ((gdouble) renderpal->cell_size,
(gdouble) renderer->width /
(gdouble) palette->n_columns);
@ -106,7 +106,7 @@ gimp_view_renderer_palette_render (GimpViewRenderer *renderer,
}
else
{
if (palette->n_columns > 1)
if (palette->n_columns > 0)
cell_width = (gdouble) renderer->width / (gdouble) palette->n_columns;
else
cell_width = (gdouble) renderer->width / 16.0;