From 7b1e7e9dfedfa2db6a3b045696c85cb8cb17b5a6 Mon Sep 17 00:00:00 2001 From: EDT 1998 Matthew Wilson Date: Wed, 15 Apr 1998 06:01:25 +0000 Subject: [PATCH] made a change to gdisplays_update_area to update _all_ gdisplays that Wed Apr 15 01:58:12 EDT 1998 Matthew Wilson * app/gdisplay.c: made a change to gdisplays_update_area to update _all_ gdisplays that point at the gimage ID. This (should) fix the paint on the second layer of a second view bug. --Matt --- ChangeLog | 6 ++++++ app/core/gimpprojection.c | 17 ++++++++++++++--- app/display/gimpdisplay.c | 17 ++++++++++++++--- app/gdisplay.c | 17 ++++++++++++++--- 4 files changed, 48 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 26d0d0c4f7..9af9ab2ba3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Wed Apr 15 01:58:12 EDT 1998 Matthew Wilson + + * app/gdisplay.c: made a change to gdisplays_update_area to + update _all_ gdisplays that point at the gimage ID. This + (should) fix the paint on the second layer of a second view bug. + Tue Apr 14 16:15:52 PDT 1998 Manish Singh * app/iscissors.c: partially applied gimp-monniaux-980413-0, diff --git a/app/core/gimpprojection.c b/app/core/gimpprojection.c index 443c885e44..8a0203361e 100644 --- a/app/core/gimpprojection.c +++ b/app/core/gimpprojection.c @@ -1194,7 +1194,7 @@ gdisplays_update_area (int ID, GDisplay *gdisp; GSList *list = display_list; int x1, y1, x2, y2; - int count = 0; + /* int count = 0; */ /* traverse the linked list of displays */ while (list) @@ -1205,6 +1205,13 @@ gdisplays_update_area (int ID, /* We only need to update the first instance that we find of this gimage ID. Otherwise, we would be reconverting the same region unnecessarily. */ + + /* Um.. I don't think so. If you only do this to the first + instance, you don't update other gdisplays pointing to this + gimage. I'm going to comment this out to show how it was in + case we need to change it back. msw 4/15/1998 + */ + /* if (! count) gdisplay_add_update_area (gdisp, x, y, w, h); else @@ -1213,9 +1220,13 @@ gdisplays_update_area (int ID, gdisplay_transform_coords (gdisp, x + w, y + h, &x2, &y2, 0); gdisplay_add_display_area (gdisp, x1, y1, (x2 - x1), (y2 - y1)); } - count++; - } + */ + gdisplay_add_update_area (gdisp, x, y, w, h); + gdisplay_transform_coords (gdisp, x, y, &x1, &y1, 0); + gdisplay_transform_coords (gdisp, x + w, y + h, &x2, &y2, 0); + gdisplay_add_display_area (gdisp, x1, y1, (x2 - x1), (y2 - y1)); + } list = g_slist_next (list); } } diff --git a/app/display/gimpdisplay.c b/app/display/gimpdisplay.c index 443c885e44..8a0203361e 100644 --- a/app/display/gimpdisplay.c +++ b/app/display/gimpdisplay.c @@ -1194,7 +1194,7 @@ gdisplays_update_area (int ID, GDisplay *gdisp; GSList *list = display_list; int x1, y1, x2, y2; - int count = 0; + /* int count = 0; */ /* traverse the linked list of displays */ while (list) @@ -1205,6 +1205,13 @@ gdisplays_update_area (int ID, /* We only need to update the first instance that we find of this gimage ID. Otherwise, we would be reconverting the same region unnecessarily. */ + + /* Um.. I don't think so. If you only do this to the first + instance, you don't update other gdisplays pointing to this + gimage. I'm going to comment this out to show how it was in + case we need to change it back. msw 4/15/1998 + */ + /* if (! count) gdisplay_add_update_area (gdisp, x, y, w, h); else @@ -1213,9 +1220,13 @@ gdisplays_update_area (int ID, gdisplay_transform_coords (gdisp, x + w, y + h, &x2, &y2, 0); gdisplay_add_display_area (gdisp, x1, y1, (x2 - x1), (y2 - y1)); } - count++; - } + */ + gdisplay_add_update_area (gdisp, x, y, w, h); + gdisplay_transform_coords (gdisp, x, y, &x1, &y1, 0); + gdisplay_transform_coords (gdisp, x + w, y + h, &x2, &y2, 0); + gdisplay_add_display_area (gdisp, x1, y1, (x2 - x1), (y2 - y1)); + } list = g_slist_next (list); } } diff --git a/app/gdisplay.c b/app/gdisplay.c index 443c885e44..8a0203361e 100644 --- a/app/gdisplay.c +++ b/app/gdisplay.c @@ -1194,7 +1194,7 @@ gdisplays_update_area (int ID, GDisplay *gdisp; GSList *list = display_list; int x1, y1, x2, y2; - int count = 0; + /* int count = 0; */ /* traverse the linked list of displays */ while (list) @@ -1205,6 +1205,13 @@ gdisplays_update_area (int ID, /* We only need to update the first instance that we find of this gimage ID. Otherwise, we would be reconverting the same region unnecessarily. */ + + /* Um.. I don't think so. If you only do this to the first + instance, you don't update other gdisplays pointing to this + gimage. I'm going to comment this out to show how it was in + case we need to change it back. msw 4/15/1998 + */ + /* if (! count) gdisplay_add_update_area (gdisp, x, y, w, h); else @@ -1213,9 +1220,13 @@ gdisplays_update_area (int ID, gdisplay_transform_coords (gdisp, x + w, y + h, &x2, &y2, 0); gdisplay_add_display_area (gdisp, x1, y1, (x2 - x1), (y2 - y1)); } - count++; - } + */ + gdisplay_add_update_area (gdisp, x, y, w, h); + gdisplay_transform_coords (gdisp, x, y, &x1, &y1, 0); + gdisplay_transform_coords (gdisp, x + w, y + h, &x2, &y2, 0); + gdisplay_add_display_area (gdisp, x1, y1, (x2 - x1), (y2 - y1)); + } list = g_slist_next (list); } }