Sun, 05 Jan 2025 17:41:39 +0100
fix missing selection init in gtk3 listview
ui/gtk/list.c | file | annotate | diff | comparison | revisions |
--- a/ui/gtk/list.c Sun Jan 05 17:31:53 2025 +0100 +++ b/ui/gtk/list.c Sun Jan 05 17:41:39 2025 +0100 @@ -204,7 +204,7 @@ UIWIDGET ui_listview_create(UiObject *obj, UiListArgs args) { UiObject* current = uic_current_obj(obj); - // to simplify things and share code with ui_tableview_create, we also + // to simplify things and share code with ui_table_create, we also // use a UiModel for the listview UiModel *model = ui_model(obj->ctx, UI_STRING, "", -1); model->getvalue = args.getvalue ? args.getvalue : ui_strmodel_getvalue; @@ -720,6 +720,8 @@ listview->widget = view; listview->var = var; listview->model = model; + listview->selection.count = 0; + listview->selection.rows = NULL; g_signal_connect( view, "destroy",