check whether the removed layer is floating_sel *and* check whether it is

* app/gimage.c (gimage_remove_layer): check whether the removed layer
        is floating_sel *and* check whether it is active_layer.
This commit is contained in:
Tim Janik 1998-03-15 07:04:54 +00:00
parent 81432a0543
commit baf7936f54
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,8 @@
Sun Mar 15 06:15:37 1998 Tim Janik <timj@gimp.org> Sun Mar 15 06:15:37 1998 Tim Janik <timj@gimp.org>
* app/gimage.c (gimage_remove_layer): check whether the removed layer
is floating_sel *and* check whether it is active_layer.
* plug-ins/exchange/exchange.c (doDialog): also destroy the main dialog * plug-ins/exchange/exchange.c (doDialog): also destroy the main dialog
if the "Cancel" button is clicked. if the "Cancel" button is clicked.

View File

@ -2193,7 +2193,7 @@ gimage_remove_layer (GImage *gimage, Layer * layer)
floating_sel_reset (layer); floating_sel_reset (layer);
} }
else if (gimage->active_layer == layer) if (gimage->active_layer == layer)
{ {
if (gimage->layers) if (gimage->layers)
gimage->active_layer = (Layer *) gimage->layer_stack->data; gimage->active_layer = (Layer *) gimage->layer_stack->data;