From 1923aac54c1e2e100187d7556dedb85866035146 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Campos Date: Mon, 9 Jul 2007 13:38:17 +0000 Subject: [PATCH] Fix selection of first item in list form fields. 2007-07-09 Carlos Garcia Campos * shell/ev-view.c: (ev_view_form_field_choice_save): Fix selection of first item in list form fields. svn path=/trunk/; revision=2563 --- ChangeLog | 6 ++++++ shell/ev-view.c | 14 +++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 743623c3..f19add66 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-07-09 Carlos Garcia Campos + + * shell/ev-view.c: (ev_view_form_field_choice_save): + + Fix selection of first item in list form fields. + 2007-07-09 Carlos Garcia Campos * shell/ev-pixbuf-cache.c: (add_job), (add_job_if_needed), diff --git a/shell/ev-view.c b/shell/ev-view.c index 468a8946..f46f1652 100644 --- a/shell/ev-view.c +++ b/shell/ev-view.c @@ -1761,13 +1761,13 @@ ev_view_form_field_choice_save (EvView *view, if (field_choice->is_editable) { ev_document_forms_form_field_choice_set_text (EV_DOCUMENT_FORMS (view->document), field, field_choice->text); - } - - ev_document_forms_form_field_choice_unselect_all (EV_DOCUMENT_FORMS (view->document), field); - for (l = field_choice->selected_items; l && l->data; l = g_list_next (l)) { - ev_document_forms_form_field_choice_select_item (EV_DOCUMENT_FORMS (view->document), - field, - GPOINTER_TO_INT (l->data)); + } else { + ev_document_forms_form_field_choice_unselect_all (EV_DOCUMENT_FORMS (view->document), field); + for (l = field_choice->selected_items; l; l = g_list_next (l)) { + ev_document_forms_form_field_choice_select_item (EV_DOCUMENT_FORMS (view->document), + field, + GPOINTER_TO_INT (l->data)); + } } field->changed = FALSE; ev_pixbuf_cache_reload_page (view->pixbuf_cache, -- 2.43.5