Skip to content

Commit 74e9c90

Browse files
committed
Simplify select single call (no need for a list).
And make sure the single selection occurs after the edited image to fix the range selection.
1 parent 187a743 commit 74e9c90

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/dtgtk/thumbtable.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1389,16 +1389,12 @@ static gboolean _event_enter_notify(GtkWidget *widget,
13891389
static gboolean _do_select_single(gpointer user_data)
13901390
{
13911391
dt_thumbtable_t *table = (dt_thumbtable_t *)user_data;
1392-
const dt_imgid_t id = table->to_selid;
13931392

13941393
// always keep the edited picture selected
1395-
GList *sel = g_list_append(NULL, GINT_TO_POINTER(id));
1396-
sel = g_list_append(sel, GINT_TO_POINTER(darktable.develop->image_storage.id));
1397-
13981394
dt_selection_clear(darktable.selection);
1399-
dt_selection_select_list(darktable.selection, sel);
1395+
dt_selection_select(darktable.selection, darktable.develop->image_storage.id);
1396+
dt_selection_select(darktable.selection, table->to_selid);
14001397
table->sel_single_cb = 0;
1401-
g_list_free(sel);
14021398

14031399
return FALSE;
14041400
}

0 commit comments

Comments
 (0)