583 ui_update_liststore(view->liststore, list); |
583 ui_update_liststore(view->liststore, list); |
584 } else { |
584 } else { |
585 void *value = list->get(list, i); |
585 void *value = list->get(list, i); |
586 if(value) { |
586 if(value) { |
587 ObjWrapper *obj = obj_wrapper_new(value); |
587 ObjWrapper *obj = obj_wrapper_new(value); |
588 g_list_store_remove(view->liststore, i); |
588 // TODO: if index i is selected, the selection is lost |
589 g_list_store_insert(view->liststore, i, obj); |
589 // is it possible to update the item without removing it? |
|
590 g_list_store_splice(view->liststore, i, 1, (void **)&obj, 1); |
590 } |
591 } |
591 } |
592 } |
592 } |
593 } |
593 |
594 |
594 UiListSelection ui_listview_getselection2(UiList *list) { |
595 UiListSelection ui_listview_getselection2(UiList *list) { |