X-Git-Url: http://geeqie.org/cgi-bin/gitweb.cgi?p=geeqie.git;a=blobdiff_plain;f=src%2Fview_file%2Fview_file_icon.c;h=cd5d05ce125441392cd4fe74a3acb67f7279b914;hp=c2a423b9afaa534b60163fce295036f4c99103db;hb=e7c45a6fc20c21622ed6af044c5261d8bc835012;hpb=ba734b423b0b0b1c6a4a0a58af607a7c76168234 diff --git a/src/view_file/view_file_icon.c b/src/view_file/view_file_icon.c index c2a423b9..cd5d05ce 100644 --- a/src/view_file/view_file_icon.c +++ b/src/view_file/view_file_icon.c @@ -1267,7 +1267,6 @@ gboolean vficon_press_key_cb(GtkWidget *widget, GdkEventKey *event, gpointer dat fc = fileclusterlist_create_cluster(vf->cluster_list, VFICON(vf)->selection); if (fc) { - // TODO(xsdg): set CLUSTER_CHILD vficon_selection_add(vf, VFICON(vf)->selection->data, SELECTION_CLUSTER_HEAD, NULL); vf_refresh(vf); } @@ -1293,7 +1292,18 @@ gboolean vficon_press_key_cb(GtkWidget *widget, GdkEventKey *event, gpointer dat FileCluster *fc = g_hash_table_lookup(vf->cluster_list->clusters, fd); if (fc) { - filecluster_toggle_show_children(fc); + if (filecluster_toggle_show_children(fc)) + { + for (GList *work = fc->items; work; work = work->next) + { + // TODO(xsdg): This is broken because the FileData pointer stored in the + // cluster is different from the one just added to vf->list, even though + // they are equivalent. + FileData *fd = work->data; + if (work == fc->head) continue; + vficon_selection_add(vf, fd, SELECTION_CLUSTER_CHILD, NULL); + } + } vf_refresh(vf); } }