Skip to content

Commit 94f190f

Browse files
committed
mostly fix infobar again
1 parent 75e34c3 commit 94f190f

File tree

4 files changed

+32
-22
lines changed

4 files changed

+32
-22
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
- matching changes in libvips 8.18 improve render speed and improve
1212
cancellation of out of date renders
1313
- better sync of view settings between imagewindow and thumbnail
14+
- better row dirty marking stops subrows getting stuck in large workspaces
1415

1516
## 9.0.10 2025/06/22
1617

TODO

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
- try:
2+
3+
Hist > New > Identity
4+
Image A1.value
5+
6+
infobar shows (x, y), not just x, and value does not display
7+
8+
19
- get judder with rotate and images smaller than the window
210

311
draw on update, then draw again on relayout

src/imageui.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ imageui_set_property(GObject *object,
359359
imageui->tilesource = TILESOURCE(g_value_get_object(value));
360360
if (imageui->tilesource)
361361
imageui->zoom_load = imageui->tilesource->zoom;
362+
362363
break;
363364

364365
case PROP_IIMAGE:
@@ -380,6 +381,7 @@ imageui_set_property(GObject *object,
380381
g_object_set(imageui->imagedisplay,
381382
"zoom", zoom,
382383
NULL);
384+
383385
break;
384386

385387
case PROP_X:

src/infobar.c

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,18 @@ static const int infobar_label_width[] = {
9393
10, /* double complex */
9494
};
9595

96-
/* Tilesource has a new image. We need a new number of band elements and
97-
* dimensions.
96+
/* We have a new image to display -- rebuild widgets.
9897
*/
9998
static void
100-
infobar_tilesource_changed(Tilesource *tilesource, Infobar *infobar)
99+
infobar_new_image(Infobar *infobar)
101100
{
102-
VipsImage *image = tilesource->image;
101+
Tilesource *tilesource;
102+
if (!(tilesource = imagewindow_get_tilesource(infobar->win)))
103+
return;
104+
105+
VipsImage *image;
106+
if (!(image = tilesource_get_base_image(tilesource)))
107+
return;
103108

104109
GSList *p;
105110
VipsBandFormat format;
@@ -110,7 +115,7 @@ infobar_tilesource_changed(Tilesource *tilesource, Infobar *infobar)
110115
int i;
111116

112117
#ifdef DEBUG
113-
printf("infobar_tilesource_changed:\n");
118+
printf("infobar_new_image:\n");
114119
#endif /*DEBUG*/
115120

116121
/* Remove all existing children of infobar->values.
@@ -251,7 +256,7 @@ infobar_update_pixel(Infobar *infobar,
251256

252257
PixelUpdate *update = g_new0(PixelUpdate, 1);
253258
update->infobar = infobar;
254-
update->image = tilesource->image;
259+
update->image = tilesource_get_base_image(tilesource);
255260

256261
/* Currently in level0 image coordinates ... we will fetch from
257262
* tilesource->image, the current pyr layer.
@@ -305,32 +310,27 @@ infobar_status_update(Infobar *infobar)
305310
}
306311

307312
static void
308-
infobar_status_changed(Imagewindow *win, Infobar *infobar)
313+
infobar_imagewindow_status_changed(Imagewindow *win, Infobar *infobar)
309314
{
310315
if (!gtk_action_bar_get_revealed(GTK_ACTION_BAR(infobar->action_bar)) ||
311316
!imagewindow_get_tilesource(infobar->win))
312317
return;
313318

314319
#ifdef DEBUG
315-
printf("infobar_status_changed:\n");
320+
printf("infobar_imagewindow_status_changed:\n");
316321
#endif /*DEBUG*/
317322

318323
infobar_status_update(infobar);
319324
}
320325

321-
/* Imagewindow has a new tilesource.
322-
*/
323326
static void
324-
infobar_imagewindow_changed(Imagewindow *win, Infobar *infobar)
327+
infobar_imagewindow_new_image(Imagewindow *win, Infobar *infobar)
325328
{
326-
Tilesource *tilesource;
329+
#ifdef DEBUG
330+
printf("infobar_imagewindow_new_image:\n");
331+
#endif /*DEBUG*/
327332

328-
if ((tilesource = imagewindow_get_tilesource(win))) {
329-
g_signal_connect_object(tilesource, "changed",
330-
G_CALLBACK(infobar_tilesource_changed), infobar, 0);
331-
g_signal_connect_object(tilesource, "page-changed",
332-
G_CALLBACK(infobar_status_changed), infobar, 0);
333-
}
333+
infobar_new_image(infobar);
334334
}
335335

336336
static void
@@ -340,11 +340,10 @@ infobar_set_imagewindow(Infobar *infobar, Imagewindow *win)
340340
*/
341341
infobar->win = win;
342342

343-
g_signal_connect_object(win, "changed",
344-
G_CALLBACK(infobar_imagewindow_changed), infobar, 0);
345-
346343
g_signal_connect_object(win, "status-changed",
347-
G_CALLBACK(infobar_status_changed), infobar, 0);
344+
G_CALLBACK(infobar_imagewindow_status_changed), infobar, 0);
345+
g_signal_connect_object(win, "new-image",
346+
G_CALLBACK(infobar_imagewindow_new_image), infobar, 0);
348347
}
349348

350349
static void

0 commit comments

Comments
 (0)