Skip to content

Commit baef115

Browse files
committed
more recover polish
1 parent f003643 commit baef115

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

TODO

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
- doubleclick on file in recover to load?
2+
13
- try a flatpak build
24

35
will need a network connection

src/action.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,6 +1034,7 @@ action_proc_div(Reduce *rc, Compile *compile,
10341034
else if (PEISIMAGE(a) && PEISIMAGE(b))
10351035
vo_callva(rc, out, "divide", PEGETIMAGE(a), PEGETIMAGE(b));
10361036
else if (PEISIMAGE(a) && PEISREAL(b)) {
1037+
10371038
g_autoptr(VipsArrayDouble) aa =
10381039
vips_array_double_newv(1, 1.0 / PEGETREAL(b));
10391040
g_autoptr(VipsArrayDouble) ab =

src/colour.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,8 @@ colour_ii_new(Colour *colour)
175175

176176
float valuef[3];
177177
for (int i = 0; i < 3; i++)
178-
valuef[i] = colour->value[i];
178+
// make sure we don't write -nan etc.
179+
valuef[i] = isnormal(colour->value[i]) ? valuef[i] : 0.0;
179180
if (vips_image_write_line(ii->image, 0, (VipsPel *) valuef))
180181
return NULL;
181182

src/recover.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,6 @@ recover_delete_temp(const char *filename)
372372

373373
return NULL;
374374
}
375-
376375
static void
377376
recover_delete_temps(void)
378377
{
@@ -446,7 +445,8 @@ recover_ok_action(GSimpleAction *action,
446445

447446
Mainwindow *main = mainwindow_new(APP(app), wsg);
448447
gtk_window_present(GTK_WINDOW(main));
449-
mainwindow_cull();
448+
// don't call mainwindow_cull() .... we don't want to remove empty
449+
// recovered wses
450450
symbol_recalculate_all();
451451

452452
gtk_window_destroy(GTK_WINDOW(recover));

0 commit comments

Comments
 (0)