@@ -130,9 +130,11 @@ iimageview_refresh(vObject *vobject)
130130 iImageview * iimageview = IIMAGEVIEW (vobject );
131131 iImage * iimage = IIMAGE (vobject -> iobject );
132132
133+ Tilesource * tilesource ;
134+
133135#ifdef DEBUG
134- printf ("iimageview_refresh:\n" );
135136#endif /*DEBUG*/
137+ printf ("iimageview_refresh:\n" );
136138
137139 // on the first refresh, register with the enclosing workspaceview
138140 if (iimageview -> first ) {
@@ -150,13 +152,12 @@ iimageview_refresh(vObject *vobject)
150152 "tilesource" , NULL ,
151153 NULL );
152154 else {
153- Tilesource * current_tilesource ;
154155 g_object_get (iimageview -> imagedisplay ,
155- "tilesource" , & current_tilesource ,
156+ "tilesource" , & tilesource ,
156157 NULL );
157158
158- if (current_tilesource &&
159- current_tilesource -> image != iimage -> value .ii -> image ) {
159+ if (! tilesource ||
160+ ( tilesource -> image != iimage -> value .ii -> image ) ) {
160161 Tilesource * new_tilesource =
161162 tilesource_new_from_iimage (iimage , -1000 );
162163
@@ -171,10 +172,20 @@ iimageview_refresh(vObject *vobject)
171172 VIPS_UNREF (new_tilesource );
172173 }
173174
174- VIPS_UNREF (current_tilesource );
175+ VIPS_UNREF (tilesource );
175176 }
176177 }
177178
179+ g_object_get (iimageview -> imagedisplay ,
180+ "tilesource" , & tilesource ,
181+ NULL );
182+ if (tilesource )
183+ g_object_set (tilesource ,
184+ "scale" , iimage -> scale ,
185+ "offset" , iimage -> offset ,
186+ "falsecolour" , iimage -> falsecolour ,
187+ NULL );
188+
178189 if (iimageview -> label )
179190 set_glabel (iimageview -> label , "%s" , IOBJECT (iimage )-> caption );
180191
0 commit comments