If the cursor moves from one register cell to another, refresh the register headers.

If trading accounts are on and the transaction is expanded then the headers
depend on the type of split the cursor is in.
This commit is contained in:
Mike Alexander 2014-09-01 01:36:06 -04:00
parent 483302aba0
commit 668aab4a2b
3 changed files with 6 additions and 1 deletions

View File

@ -222,7 +222,7 @@ gnc_header_draw (GnomeCanvasItem *item, GdkDrawable *drawable,
}
static void
void
gnc_header_request_redraw (GncHeader *header)
{
GnomeCanvas *canvas = GNOME_CANVAS_ITEM(header)->canvas;

View File

@ -64,6 +64,7 @@ typedef struct
GtkWidget *gnc_header_new (GnucashSheet *sheet);
void gnc_header_reconfigure (GncHeader *header);
void gnc_header_request_redraw (GncHeader *header);
void gnc_header_set_header_rows (GncHeader *header,
int num_phys_rows);

View File

@ -348,6 +348,10 @@ gnucash_sheet_cursor_move (GnucashSheet *sheet, VirtualLocation virt_loc)
gnucash_sheet_make_cell_visible (sheet, virt_loc);
changed_cells = !virt_loc_equal (virt_loc, old_virt_loc);
/* If we've changed cells, redraw the headers */
if (changed_cells)
gnc_header_request_redraw (GNC_HEADER(sheet->header_item));
/* Now turn on the editing controls. */
gnucash_sheet_activate_cursor_cell (sheet, changed_cells);