diff --git a/ChangeLog b/ChangeLog index 909669c248..9e10dc4f14 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Jul 8 21:08:03 CDT 1998 Larry Ewing + + * app/gimpimage.c (gimp_image_raise_layer): fixed a small typo + that prevented the composite image from being updated properly + Wed Jul 8 10:47:51 CDT 1998 Larry Ewing * app/preferences_dialog.c: replaced old invalidate calls diff --git a/app/core/gimpimage-guides.c b/app/core/gimpimage-guides.c index 8f00417b0f..40bdf5898c 100644 --- a/app/core/gimpimage-guides.c +++ b/app/core/gimpimage-guides.c @@ -1583,13 +1583,14 @@ gimp_image_raise_layer (GimpImage *gimage, Layer *layer_arg) x1 = MAX (off_x, off2_x); y1 = MAX (off_y, off2_y); x2 = MIN (off_x + drawable_width (GIMP_DRAWABLE(layer)), - off2_x + drawable_width (GIMP_DRAWABLE(prev_layer))); + off2_x + drawable_width (GIMP_DRAWABLE(prev_layer))); y2 = MIN (off_y + drawable_height (GIMP_DRAWABLE(layer)), - off2_y + drawable_height (GIMP_DRAWABLE(prev_layer))); + off2_y + drawable_height (GIMP_DRAWABLE(prev_layer))); + if ((x2 - x1) > 0 && (y2 - y1) > 0) - gtk_signal_emit(GTK_OBJECT(gimage), - gimp_image_signals[REPAINT], - x1, x2, x2-x1, y2-y1); + gtk_signal_emit(GTK_OBJECT(gimage), + gimp_image_signals[REPAINT], + x1, y1, x2-x1, y2-y1); /* invalidate the composite preview */ gimp_image_invalidate_preview (gimage); @@ -1649,19 +1650,20 @@ gimp_image_lower_layer (GimpImage *gimage, Layer *layer_arg) next->data = layer; drawable_offsets (GIMP_DRAWABLE(layer), &off_x, &off_y); drawable_offsets (GIMP_DRAWABLE(next_layer), &off2_x, &off2_y); - + /* calculate minimum area to update */ x1 = MAX (off_x, off2_x); y1 = MAX (off_y, off2_y); x2 = MIN (off_x + drawable_width (GIMP_DRAWABLE(layer)), - off2_x + drawable_width (GIMP_DRAWABLE(next_layer))); + off2_x + drawable_width (GIMP_DRAWABLE(next_layer))); y2 = MIN (off_y + drawable_height (GIMP_DRAWABLE(layer)), - off2_y + drawable_height (GIMP_DRAWABLE(next_layer))); - if ((x2 - x1) > 0 && (y2 - y1) > 0) - gtk_signal_emit(GTK_OBJECT(gimage), - gimp_image_signals[REPAINT], - x1, y1, x2-x1, y2-y1); + off2_y + drawable_height (GIMP_DRAWABLE(next_layer))); + if ((x2 - x1) > 0 && (y2 - y1) > 0) + gtk_signal_emit(GTK_OBJECT(gimage), + gimp_image_signals[REPAINT], + x1, y1, x2-x1, y2-y1); + /* invalidate the composite preview */ gimp_image_invalidate_preview (gimage); diff --git a/app/core/gimpimage-merge.c b/app/core/gimpimage-merge.c index 8f00417b0f..40bdf5898c 100644 --- a/app/core/gimpimage-merge.c +++ b/app/core/gimpimage-merge.c @@ -1583,13 +1583,14 @@ gimp_image_raise_layer (GimpImage *gimage, Layer *layer_arg) x1 = MAX (off_x, off2_x); y1 = MAX (off_y, off2_y); x2 = MIN (off_x + drawable_width (GIMP_DRAWABLE(layer)), - off2_x + drawable_width (GIMP_DRAWABLE(prev_layer))); + off2_x + drawable_width (GIMP_DRAWABLE(prev_layer))); y2 = MIN (off_y + drawable_height (GIMP_DRAWABLE(layer)), - off2_y + drawable_height (GIMP_DRAWABLE(prev_layer))); + off2_y + drawable_height (GIMP_DRAWABLE(prev_layer))); + if ((x2 - x1) > 0 && (y2 - y1) > 0) - gtk_signal_emit(GTK_OBJECT(gimage), - gimp_image_signals[REPAINT], - x1, x2, x2-x1, y2-y1); + gtk_signal_emit(GTK_OBJECT(gimage), + gimp_image_signals[REPAINT], + x1, y1, x2-x1, y2-y1); /* invalidate the composite preview */ gimp_image_invalidate_preview (gimage); @@ -1649,19 +1650,20 @@ gimp_image_lower_layer (GimpImage *gimage, Layer *layer_arg) next->data = layer; drawable_offsets (GIMP_DRAWABLE(layer), &off_x, &off_y); drawable_offsets (GIMP_DRAWABLE(next_layer), &off2_x, &off2_y); - + /* calculate minimum area to update */ x1 = MAX (off_x, off2_x); y1 = MAX (off_y, off2_y); x2 = MIN (off_x + drawable_width (GIMP_DRAWABLE(layer)), - off2_x + drawable_width (GIMP_DRAWABLE(next_layer))); + off2_x + drawable_width (GIMP_DRAWABLE(next_layer))); y2 = MIN (off_y + drawable_height (GIMP_DRAWABLE(layer)), - off2_y + drawable_height (GIMP_DRAWABLE(next_layer))); - if ((x2 - x1) > 0 && (y2 - y1) > 0) - gtk_signal_emit(GTK_OBJECT(gimage), - gimp_image_signals[REPAINT], - x1, y1, x2-x1, y2-y1); + off2_y + drawable_height (GIMP_DRAWABLE(next_layer))); + if ((x2 - x1) > 0 && (y2 - y1) > 0) + gtk_signal_emit(GTK_OBJECT(gimage), + gimp_image_signals[REPAINT], + x1, y1, x2-x1, y2-y1); + /* invalidate the composite preview */ gimp_image_invalidate_preview (gimage); diff --git a/app/core/gimpimage-projection.c b/app/core/gimpimage-projection.c index 8f00417b0f..40bdf5898c 100644 --- a/app/core/gimpimage-projection.c +++ b/app/core/gimpimage-projection.c @@ -1583,13 +1583,14 @@ gimp_image_raise_layer (GimpImage *gimage, Layer *layer_arg) x1 = MAX (off_x, off2_x); y1 = MAX (off_y, off2_y); x2 = MIN (off_x + drawable_width (GIMP_DRAWABLE(layer)), - off2_x + drawable_width (GIMP_DRAWABLE(prev_layer))); + off2_x + drawable_width (GIMP_DRAWABLE(prev_layer))); y2 = MIN (off_y + drawable_height (GIMP_DRAWABLE(layer)), - off2_y + drawable_height (GIMP_DRAWABLE(prev_layer))); + off2_y + drawable_height (GIMP_DRAWABLE(prev_layer))); + if ((x2 - x1) > 0 && (y2 - y1) > 0) - gtk_signal_emit(GTK_OBJECT(gimage), - gimp_image_signals[REPAINT], - x1, x2, x2-x1, y2-y1); + gtk_signal_emit(GTK_OBJECT(gimage), + gimp_image_signals[REPAINT], + x1, y1, x2-x1, y2-y1); /* invalidate the composite preview */ gimp_image_invalidate_preview (gimage); @@ -1649,19 +1650,20 @@ gimp_image_lower_layer (GimpImage *gimage, Layer *layer_arg) next->data = layer; drawable_offsets (GIMP_DRAWABLE(layer), &off_x, &off_y); drawable_offsets (GIMP_DRAWABLE(next_layer), &off2_x, &off2_y); - + /* calculate minimum area to update */ x1 = MAX (off_x, off2_x); y1 = MAX (off_y, off2_y); x2 = MIN (off_x + drawable_width (GIMP_DRAWABLE(layer)), - off2_x + drawable_width (GIMP_DRAWABLE(next_layer))); + off2_x + drawable_width (GIMP_DRAWABLE(next_layer))); y2 = MIN (off_y + drawable_height (GIMP_DRAWABLE(layer)), - off2_y + drawable_height (GIMP_DRAWABLE(next_layer))); - if ((x2 - x1) > 0 && (y2 - y1) > 0) - gtk_signal_emit(GTK_OBJECT(gimage), - gimp_image_signals[REPAINT], - x1, y1, x2-x1, y2-y1); + off2_y + drawable_height (GIMP_DRAWABLE(next_layer))); + if ((x2 - x1) > 0 && (y2 - y1) > 0) + gtk_signal_emit(GTK_OBJECT(gimage), + gimp_image_signals[REPAINT], + x1, y1, x2-x1, y2-y1); + /* invalidate the composite preview */ gimp_image_invalidate_preview (gimage); diff --git a/app/core/gimpimage-resize.c b/app/core/gimpimage-resize.c index 8f00417b0f..40bdf5898c 100644 --- a/app/core/gimpimage-resize.c +++ b/app/core/gimpimage-resize.c @@ -1583,13 +1583,14 @@ gimp_image_raise_layer (GimpImage *gimage, Layer *layer_arg) x1 = MAX (off_x, off2_x); y1 = MAX (off_y, off2_y); x2 = MIN (off_x + drawable_width (GIMP_DRAWABLE(layer)), - off2_x + drawable_width (GIMP_DRAWABLE(prev_layer))); + off2_x + drawable_width (GIMP_DRAWABLE(prev_layer))); y2 = MIN (off_y + drawable_height (GIMP_DRAWABLE(layer)), - off2_y + drawable_height (GIMP_DRAWABLE(prev_layer))); + off2_y + drawable_height (GIMP_DRAWABLE(prev_layer))); + if ((x2 - x1) > 0 && (y2 - y1) > 0) - gtk_signal_emit(GTK_OBJECT(gimage), - gimp_image_signals[REPAINT], - x1, x2, x2-x1, y2-y1); + gtk_signal_emit(GTK_OBJECT(gimage), + gimp_image_signals[REPAINT], + x1, y1, x2-x1, y2-y1); /* invalidate the composite preview */ gimp_image_invalidate_preview (gimage); @@ -1649,19 +1650,20 @@ gimp_image_lower_layer (GimpImage *gimage, Layer *layer_arg) next->data = layer; drawable_offsets (GIMP_DRAWABLE(layer), &off_x, &off_y); drawable_offsets (GIMP_DRAWABLE(next_layer), &off2_x, &off2_y); - + /* calculate minimum area to update */ x1 = MAX (off_x, off2_x); y1 = MAX (off_y, off2_y); x2 = MIN (off_x + drawable_width (GIMP_DRAWABLE(layer)), - off2_x + drawable_width (GIMP_DRAWABLE(next_layer))); + off2_x + drawable_width (GIMP_DRAWABLE(next_layer))); y2 = MIN (off_y + drawable_height (GIMP_DRAWABLE(layer)), - off2_y + drawable_height (GIMP_DRAWABLE(next_layer))); - if ((x2 - x1) > 0 && (y2 - y1) > 0) - gtk_signal_emit(GTK_OBJECT(gimage), - gimp_image_signals[REPAINT], - x1, y1, x2-x1, y2-y1); + off2_y + drawable_height (GIMP_DRAWABLE(next_layer))); + if ((x2 - x1) > 0 && (y2 - y1) > 0) + gtk_signal_emit(GTK_OBJECT(gimage), + gimp_image_signals[REPAINT], + x1, y1, x2-x1, y2-y1); + /* invalidate the composite preview */ gimp_image_invalidate_preview (gimage); diff --git a/app/core/gimpimage-scale.c b/app/core/gimpimage-scale.c index 8f00417b0f..40bdf5898c 100644 --- a/app/core/gimpimage-scale.c +++ b/app/core/gimpimage-scale.c @@ -1583,13 +1583,14 @@ gimp_image_raise_layer (GimpImage *gimage, Layer *layer_arg) x1 = MAX (off_x, off2_x); y1 = MAX (off_y, off2_y); x2 = MIN (off_x + drawable_width (GIMP_DRAWABLE(layer)), - off2_x + drawable_width (GIMP_DRAWABLE(prev_layer))); + off2_x + drawable_width (GIMP_DRAWABLE(prev_layer))); y2 = MIN (off_y + drawable_height (GIMP_DRAWABLE(layer)), - off2_y + drawable_height (GIMP_DRAWABLE(prev_layer))); + off2_y + drawable_height (GIMP_DRAWABLE(prev_layer))); + if ((x2 - x1) > 0 && (y2 - y1) > 0) - gtk_signal_emit(GTK_OBJECT(gimage), - gimp_image_signals[REPAINT], - x1, x2, x2-x1, y2-y1); + gtk_signal_emit(GTK_OBJECT(gimage), + gimp_image_signals[REPAINT], + x1, y1, x2-x1, y2-y1); /* invalidate the composite preview */ gimp_image_invalidate_preview (gimage); @@ -1649,19 +1650,20 @@ gimp_image_lower_layer (GimpImage *gimage, Layer *layer_arg) next->data = layer; drawable_offsets (GIMP_DRAWABLE(layer), &off_x, &off_y); drawable_offsets (GIMP_DRAWABLE(next_layer), &off2_x, &off2_y); - + /* calculate minimum area to update */ x1 = MAX (off_x, off2_x); y1 = MAX (off_y, off2_y); x2 = MIN (off_x + drawable_width (GIMP_DRAWABLE(layer)), - off2_x + drawable_width (GIMP_DRAWABLE(next_layer))); + off2_x + drawable_width (GIMP_DRAWABLE(next_layer))); y2 = MIN (off_y + drawable_height (GIMP_DRAWABLE(layer)), - off2_y + drawable_height (GIMP_DRAWABLE(next_layer))); - if ((x2 - x1) > 0 && (y2 - y1) > 0) - gtk_signal_emit(GTK_OBJECT(gimage), - gimp_image_signals[REPAINT], - x1, y1, x2-x1, y2-y1); + off2_y + drawable_height (GIMP_DRAWABLE(next_layer))); + if ((x2 - x1) > 0 && (y2 - y1) > 0) + gtk_signal_emit(GTK_OBJECT(gimage), + gimp_image_signals[REPAINT], + x1, y1, x2-x1, y2-y1); + /* invalidate the composite preview */ gimp_image_invalidate_preview (gimage); diff --git a/app/core/gimpimage.c b/app/core/gimpimage.c index 8f00417b0f..40bdf5898c 100644 --- a/app/core/gimpimage.c +++ b/app/core/gimpimage.c @@ -1583,13 +1583,14 @@ gimp_image_raise_layer (GimpImage *gimage, Layer *layer_arg) x1 = MAX (off_x, off2_x); y1 = MAX (off_y, off2_y); x2 = MIN (off_x + drawable_width (GIMP_DRAWABLE(layer)), - off2_x + drawable_width (GIMP_DRAWABLE(prev_layer))); + off2_x + drawable_width (GIMP_DRAWABLE(prev_layer))); y2 = MIN (off_y + drawable_height (GIMP_DRAWABLE(layer)), - off2_y + drawable_height (GIMP_DRAWABLE(prev_layer))); + off2_y + drawable_height (GIMP_DRAWABLE(prev_layer))); + if ((x2 - x1) > 0 && (y2 - y1) > 0) - gtk_signal_emit(GTK_OBJECT(gimage), - gimp_image_signals[REPAINT], - x1, x2, x2-x1, y2-y1); + gtk_signal_emit(GTK_OBJECT(gimage), + gimp_image_signals[REPAINT], + x1, y1, x2-x1, y2-y1); /* invalidate the composite preview */ gimp_image_invalidate_preview (gimage); @@ -1649,19 +1650,20 @@ gimp_image_lower_layer (GimpImage *gimage, Layer *layer_arg) next->data = layer; drawable_offsets (GIMP_DRAWABLE(layer), &off_x, &off_y); drawable_offsets (GIMP_DRAWABLE(next_layer), &off2_x, &off2_y); - + /* calculate minimum area to update */ x1 = MAX (off_x, off2_x); y1 = MAX (off_y, off2_y); x2 = MIN (off_x + drawable_width (GIMP_DRAWABLE(layer)), - off2_x + drawable_width (GIMP_DRAWABLE(next_layer))); + off2_x + drawable_width (GIMP_DRAWABLE(next_layer))); y2 = MIN (off_y + drawable_height (GIMP_DRAWABLE(layer)), - off2_y + drawable_height (GIMP_DRAWABLE(next_layer))); - if ((x2 - x1) > 0 && (y2 - y1) > 0) - gtk_signal_emit(GTK_OBJECT(gimage), - gimp_image_signals[REPAINT], - x1, y1, x2-x1, y2-y1); + off2_y + drawable_height (GIMP_DRAWABLE(next_layer))); + if ((x2 - x1) > 0 && (y2 - y1) > 0) + gtk_signal_emit(GTK_OBJECT(gimage), + gimp_image_signals[REPAINT], + x1, y1, x2-x1, y2-y1); + /* invalidate the composite preview */ gimp_image_invalidate_preview (gimage); diff --git a/app/core/gimpprojection-construct.c b/app/core/gimpprojection-construct.c index 8f00417b0f..40bdf5898c 100644 --- a/app/core/gimpprojection-construct.c +++ b/app/core/gimpprojection-construct.c @@ -1583,13 +1583,14 @@ gimp_image_raise_layer (GimpImage *gimage, Layer *layer_arg) x1 = MAX (off_x, off2_x); y1 = MAX (off_y, off2_y); x2 = MIN (off_x + drawable_width (GIMP_DRAWABLE(layer)), - off2_x + drawable_width (GIMP_DRAWABLE(prev_layer))); + off2_x + drawable_width (GIMP_DRAWABLE(prev_layer))); y2 = MIN (off_y + drawable_height (GIMP_DRAWABLE(layer)), - off2_y + drawable_height (GIMP_DRAWABLE(prev_layer))); + off2_y + drawable_height (GIMP_DRAWABLE(prev_layer))); + if ((x2 - x1) > 0 && (y2 - y1) > 0) - gtk_signal_emit(GTK_OBJECT(gimage), - gimp_image_signals[REPAINT], - x1, x2, x2-x1, y2-y1); + gtk_signal_emit(GTK_OBJECT(gimage), + gimp_image_signals[REPAINT], + x1, y1, x2-x1, y2-y1); /* invalidate the composite preview */ gimp_image_invalidate_preview (gimage); @@ -1649,19 +1650,20 @@ gimp_image_lower_layer (GimpImage *gimage, Layer *layer_arg) next->data = layer; drawable_offsets (GIMP_DRAWABLE(layer), &off_x, &off_y); drawable_offsets (GIMP_DRAWABLE(next_layer), &off2_x, &off2_y); - + /* calculate minimum area to update */ x1 = MAX (off_x, off2_x); y1 = MAX (off_y, off2_y); x2 = MIN (off_x + drawable_width (GIMP_DRAWABLE(layer)), - off2_x + drawable_width (GIMP_DRAWABLE(next_layer))); + off2_x + drawable_width (GIMP_DRAWABLE(next_layer))); y2 = MIN (off_y + drawable_height (GIMP_DRAWABLE(layer)), - off2_y + drawable_height (GIMP_DRAWABLE(next_layer))); - if ((x2 - x1) > 0 && (y2 - y1) > 0) - gtk_signal_emit(GTK_OBJECT(gimage), - gimp_image_signals[REPAINT], - x1, y1, x2-x1, y2-y1); + off2_y + drawable_height (GIMP_DRAWABLE(next_layer))); + if ((x2 - x1) > 0 && (y2 - y1) > 0) + gtk_signal_emit(GTK_OBJECT(gimage), + gimp_image_signals[REPAINT], + x1, y1, x2-x1, y2-y1); + /* invalidate the composite preview */ gimp_image_invalidate_preview (gimage); diff --git a/app/gimpimage.c b/app/gimpimage.c index 8f00417b0f..40bdf5898c 100644 --- a/app/gimpimage.c +++ b/app/gimpimage.c @@ -1583,13 +1583,14 @@ gimp_image_raise_layer (GimpImage *gimage, Layer *layer_arg) x1 = MAX (off_x, off2_x); y1 = MAX (off_y, off2_y); x2 = MIN (off_x + drawable_width (GIMP_DRAWABLE(layer)), - off2_x + drawable_width (GIMP_DRAWABLE(prev_layer))); + off2_x + drawable_width (GIMP_DRAWABLE(prev_layer))); y2 = MIN (off_y + drawable_height (GIMP_DRAWABLE(layer)), - off2_y + drawable_height (GIMP_DRAWABLE(prev_layer))); + off2_y + drawable_height (GIMP_DRAWABLE(prev_layer))); + if ((x2 - x1) > 0 && (y2 - y1) > 0) - gtk_signal_emit(GTK_OBJECT(gimage), - gimp_image_signals[REPAINT], - x1, x2, x2-x1, y2-y1); + gtk_signal_emit(GTK_OBJECT(gimage), + gimp_image_signals[REPAINT], + x1, y1, x2-x1, y2-y1); /* invalidate the composite preview */ gimp_image_invalidate_preview (gimage); @@ -1649,19 +1650,20 @@ gimp_image_lower_layer (GimpImage *gimage, Layer *layer_arg) next->data = layer; drawable_offsets (GIMP_DRAWABLE(layer), &off_x, &off_y); drawable_offsets (GIMP_DRAWABLE(next_layer), &off2_x, &off2_y); - + /* calculate minimum area to update */ x1 = MAX (off_x, off2_x); y1 = MAX (off_y, off2_y); x2 = MIN (off_x + drawable_width (GIMP_DRAWABLE(layer)), - off2_x + drawable_width (GIMP_DRAWABLE(next_layer))); + off2_x + drawable_width (GIMP_DRAWABLE(next_layer))); y2 = MIN (off_y + drawable_height (GIMP_DRAWABLE(layer)), - off2_y + drawable_height (GIMP_DRAWABLE(next_layer))); - if ((x2 - x1) > 0 && (y2 - y1) > 0) - gtk_signal_emit(GTK_OBJECT(gimage), - gimp_image_signals[REPAINT], - x1, y1, x2-x1, y2-y1); + off2_y + drawable_height (GIMP_DRAWABLE(next_layer))); + if ((x2 - x1) > 0 && (y2 - y1) > 0) + gtk_signal_emit(GTK_OBJECT(gimage), + gimp_image_signals[REPAINT], + x1, y1, x2-x1, y2-y1); + /* invalidate the composite preview */ gimp_image_invalidate_preview (gimage);