Commit 2667aca2 authored by Garry R. Osgood's avatar Garry R. Osgood Committed by Garry R. Osgood
Browse files

app/image_map.c A bit of refresh drawable code was misplaced these many

2000-08-23 Garry R. Osgood <gosgood@idt.net>
* app/image_map.c
A bit of refresh drawable code was misplaced
these many years ago, leading to the persistence
of color tool effects, as reported in Mihail
Milushev's nicely composed bug report. Closes #7626
which has the gory details.
parent 114d5567
2000-08-23 Garry R. Osgood <gosgood@idt.net>
* app/image_map.c
A bit of refresh drawable code was misplaced
these many years ago, leading to the persistence
of color tool effects, as reported in Mihail
Milushev's nicely composed bug report. Closes #7626
See http://bugs.gnome.org/db/76/7626.html for
the gory details.
Wed Aug 23 17:31:35 PDT 2000 Manish Singh <yosh@gimp.org>
 
* configure.in: perl support for COMPAT_CRUFT
......
......@@ -151,23 +151,6 @@ image_map_apply (ImageMap image_map,
_image_map->undo_tiles->width != (x2 - x1) ||
_image_map->undo_tiles->height != (y2 - y1))
{
/* If undo tiles exist, copy them to the drawable*/
if (_image_map->undo_tiles)
{
/* Copy from the drawable to the tiles */
pixel_region_init (&_image_map->srcPR, _image_map->undo_tiles, 0, 0,
_image_map->undo_tiles->width,
_image_map->undo_tiles->height,
FALSE);
pixel_region_init (&_image_map->destPR, drawable_data ( (_image_map->drawable)),
_image_map->undo_tiles->x, _image_map->undo_tiles->y,
_image_map->undo_tiles->width,
_image_map->undo_tiles->height,
TRUE);
copy_region (&_image_map->srcPR, &_image_map->destPR);
}
/* If either the extents changed or the tiles don't exist, allocate new */
if (!_image_map->undo_tiles ||
_image_map->undo_tiles->width != (x2 - x1) ||
......@@ -176,7 +159,7 @@ image_map_apply (ImageMap image_map,
/* Destroy old tiles--If they exist */
if (_image_map->undo_tiles != NULL)
tile_manager_destroy (_image_map->undo_tiles);
/* Allocate new tiles */
_image_map->undo_tiles = tile_manager_new ((x2 - x1), (y2 - y1),
drawable_bytes ( (_image_map->drawable)));
......@@ -194,6 +177,22 @@ image_map_apply (ImageMap image_map,
_image_map->undo_tiles->x = x1;
_image_map->undo_tiles->y = y1;
}
else /* _image_map->undo_tiles exist AND drawable dimensions have not changed... */
{
/* Reset to initial drawable conditions. */
/* Copy from the backup undo tiles to the drawable */
pixel_region_init (&_image_map->srcPR, _image_map->undo_tiles, 0, 0,
_image_map->undo_tiles->width,
_image_map->undo_tiles->height,
FALSE);
pixel_region_init (&_image_map->destPR, drawable_data ( (_image_map->drawable)),
_image_map->undo_tiles->x, _image_map->undo_tiles->y,
_image_map->undo_tiles->width,
_image_map->undo_tiles->height,
TRUE);
copy_region (&_image_map->srcPR, &_image_map->destPR);
}
/* Configure the src from the drawable data */
pixel_region_init (&_image_map->srcPR, _image_map->undo_tiles,
......
......@@ -151,23 +151,6 @@ image_map_apply (ImageMap image_map,
_image_map->undo_tiles->width != (x2 - x1) ||
_image_map->undo_tiles->height != (y2 - y1))
{
/* If undo tiles exist, copy them to the drawable*/
if (_image_map->undo_tiles)
{
/* Copy from the drawable to the tiles */
pixel_region_init (&_image_map->srcPR, _image_map->undo_tiles, 0, 0,
_image_map->undo_tiles->width,
_image_map->undo_tiles->height,
FALSE);
pixel_region_init (&_image_map->destPR, drawable_data ( (_image_map->drawable)),
_image_map->undo_tiles->x, _image_map->undo_tiles->y,
_image_map->undo_tiles->width,
_image_map->undo_tiles->height,
TRUE);
copy_region (&_image_map->srcPR, &_image_map->destPR);
}
/* If either the extents changed or the tiles don't exist, allocate new */
if (!_image_map->undo_tiles ||
_image_map->undo_tiles->width != (x2 - x1) ||
......@@ -176,7 +159,7 @@ image_map_apply (ImageMap image_map,
/* Destroy old tiles--If they exist */
if (_image_map->undo_tiles != NULL)
tile_manager_destroy (_image_map->undo_tiles);
/* Allocate new tiles */
_image_map->undo_tiles = tile_manager_new ((x2 - x1), (y2 - y1),
drawable_bytes ( (_image_map->drawable)));
......@@ -194,6 +177,22 @@ image_map_apply (ImageMap image_map,
_image_map->undo_tiles->x = x1;
_image_map->undo_tiles->y = y1;
}
else /* _image_map->undo_tiles exist AND drawable dimensions have not changed... */
{
/* Reset to initial drawable conditions. */
/* Copy from the backup undo tiles to the drawable */
pixel_region_init (&_image_map->srcPR, _image_map->undo_tiles, 0, 0,
_image_map->undo_tiles->width,
_image_map->undo_tiles->height,
FALSE);
pixel_region_init (&_image_map->destPR, drawable_data ( (_image_map->drawable)),
_image_map->undo_tiles->x, _image_map->undo_tiles->y,
_image_map->undo_tiles->width,
_image_map->undo_tiles->height,
TRUE);
copy_region (&_image_map->srcPR, &_image_map->destPR);
}
/* Configure the src from the drawable data */
pixel_region_init (&_image_map->srcPR, _image_map->undo_tiles,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment