aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-subset-variable.c
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/table/e-table-subset-variable.c')
-rw-r--r--widgets/table/e-table-subset-variable.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/widgets/table/e-table-subset-variable.c b/widgets/table/e-table-subset-variable.c
index c42d53842b..a8948c5e68 100644
--- a/widgets/table/e-table-subset-variable.c
+++ b/widgets/table/e-table-subset-variable.c
@@ -68,6 +68,7 @@ etssv_remove (ETableSubsetVariable *etssv,
ETableModel *etm = E_TABLE_MODEL(etssv);
ETableSubset *etss = E_TABLE_SUBSET(etssv);
int i;
+ int ret_val = FALSE;
for (i = 0; i < etss->n_map; i++){
if (etss->map_table[i] == row) {
@@ -75,10 +76,18 @@ etssv_remove (ETableSubsetVariable *etssv,
etss->n_map --;
if (!etm->frozen)
e_table_model_changed (etm);
- return TRUE;
+ ret_val = TRUE;
+ break;
}
}
- return FALSE;
+
+ for (i = 0; i < etss->n_map; i++){
+ if (etss->map_table[i] > row) {
+ etss->map_table[i] --;
+ }
+ }
+
+ return ret_val;
}
static void