diff options
Diffstat (limited to 'addressbook/gui/component/select-names/e-select-names-text-model.c')
-rw-r--r-- | addressbook/gui/component/select-names/e-select-names-text-model.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/addressbook/gui/component/select-names/e-select-names-text-model.c b/addressbook/gui/component/select-names/e-select-names-text-model.c index c6f2b7856b..782b7ebb90 100644 --- a/addressbook/gui/component/select-names/e-select-names-text-model.c +++ b/addressbook/gui/component/select-names/e-select-names-text-model.c @@ -426,10 +426,12 @@ e_select_names_text_model_insert_length (ETextModel *model, gint pos, const gcha if (new_str) { - EDestination *dest = e_destination_new (); + EDestination *dest; + dest = index >= 0 ? e_destination_copy (e_select_names_model_get_destination (source, index)) : e_destination_new (); e_destination_set_raw (dest, new_str); - e_select_names_model_replace (source, index, dest); + + /* e_select_names_model_replace (source, index, dest); */ if (this_length > 0) { repos.model = model; @@ -616,7 +618,7 @@ e_select_names_text_model_delete (ETextModel *model, gint pos, gint length) EReposDeleteShift repos; EDestination *dest; - dest = e_destination_new (); + dest = index >= 0 ? e_destination_copy (e_select_names_model_get_destination (source, index)) : e_destination_new (); e_destination_set_raw (dest, new_str); e_select_names_model_replace (source, index, dest); |