https://github.com/BestImageViewer/geeqie/issues/1241
If the image is already displayed, bring that window to the top.
If not, a new layout window is opened using the values set by the user
in Edit/Preferences/Windows/Use Current Layout For Default.
If this option has not been set, use the fixed default values.
{
LayoutWindow *nw;
- nw = layout_new(nullptr, nullptr);
- layout_sort_set_files(nw, nw->options.file_view_list_sort.method, nw->options.file_view_list_sort.ascend, nw->options.file_view_list_sort.case_sensitive);
+ nw = layout_new_from_default();
layout_set_fd(nw, fd);
return nw;
}
lw = layout_find_by_image_fd(imd);
if (lw)
+ {
layout_set_fd(lw, imd->image_fd);
+ gtk_window_present(GTK_WINDOW(lw->window));
+ }
else
+ {
view_new_layout_with_fd(imd->image_fd);
+ }
+
view_window_close(vw);
}