Several changes to fix the problem where variables beyond
the vertical size of the var sheet couldn't be added.
1. Undo the effect of commit
8c9fae384585163197685e684e62e49a6b922f0c
since it seems to cause problems and need to be rethought.
2. On the traverse callback, don't clamp the range of the requested
destination cell. Clamp it only after the signal returns.
3. Add one more row than there are variables.
+ g_signal_emit (sheet, sheet_signals[TRAVERSE], 0,
+ &sheet->active_cell,
+ &new_cell,
+ &forbidden);
+
+ if (forbidden)
+ return;
+
+
maximize_int (&new_cell.row, 0);
maximize_int (&new_cell.col, 0);
maximize_int (&new_cell.row, 0);
maximize_int (&new_cell.col, 0);
minimize_int (&new_cell.col,
psppire_axis_unit_count (sheet->haxis) - 1);
minimize_int (&new_cell.col,
psppire_axis_unit_count (sheet->haxis) - 1);
- g_signal_emit (sheet, sheet_signals[TRAVERSE], 0,
- &sheet->active_cell,
- &new_cell,
- &forbidden);
-
- if (forbidden)
- return;
-
change_active_cell (sheet, new_cell.row, new_cell.col);
change_active_cell (sheet, new_cell.row, new_cell.col);
adj->lower = 0;
adj->page_size = page_size;
adj->lower = 0;
adj->page_size = page_size;
adj->value = position * (adj->upper - adj->lower) - adj->page_size;
if ( adj->value < adj->lower)
adj->value = adj->lower;
adj->value = position * (adj->upper - adj->lower) - adj->page_size;
if ( adj->value < adj->lower)
adj->value = adj->lower;
gtk_adjustment_changed (adj);
}
gtk_adjustment_changed (adj);
}
psppire_axis_hetero_clear (vaxis);
psppire_axis_hetero_clear (vaxis);
- for (v = 0 ; v < psppire_dict_get_var_cnt (dict); ++v)
+ /* NOTE: "<=" in the following line is correct.
+ There needs to be one more row than there are variables */
+ for (v = 0 ; v <= psppire_dict_get_var_cnt (dict); ++v)
psppire_axis_hetero_append (vaxis, DEFAULT_ROW_HEIGHT);
for (i = 0 ; i < 4 ; ++i)
psppire_axis_hetero_append (vaxis, DEFAULT_ROW_HEIGHT);
for (i = 0 ; i < 4 ; ++i)