Skip to content

Commit

Permalink
gui: don't close but show files if image can't be opened
Browse files Browse the repository at this point in the history
  • Loading branch information
hanatos committed Oct 13, 2024
1 parent 169a159 commit 4e70b06
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/gui/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,10 +311,14 @@ int main(int argc, char *argv[])
if(dt_db_load_image(&vkdt.db, &vkdt.thumbnails, filename))
{
dt_log(s_log_err, "image `%s' could not be loaded!", filename);
goto out;
dt_gui_notification("image `%s' could not be loaded!", filename);
dt_view_switch(s_view_files);
}
else
{
dt_db_selection_add(&vkdt.db, 0);
dt_view_switch(s_view_darkroom);
}
dt_db_selection_add(&vkdt.db, 0);
dt_view_switch(s_view_darkroom);
}
dt_gui_read_tags();

Expand Down Expand Up @@ -381,7 +385,6 @@ int main(int argc, char *argv[])
if(qvk.qid[q] == q)
QVKL(&qvk.queue[qvk.qid[q]].mutex, vkQueueWaitIdle(qvk.queue[qvk.qid[q]].queue));

out:
// leave whatever view we're still in:
dt_view_switch(s_view_cnt);

Expand Down

0 comments on commit 4e70b06

Please sign in to comment.