Fix register tooltip crash

When the register is in double line mode, a tooltip for the transaction
association column can be shown if one is present by hovering the mouse
over the cell. If the register 'cursor' is highlighting any transaction
row this works but if the 'cursor' is on a split and mouse moves to an
association cell with an entry, Gnucash will crash. To fix this use the
SheetBlockStyle from block instead of the GnucashCursor.
This commit is contained in:
Robert Fewell 2019-07-30 14:55:59 +01:00
parent db93aec58d
commit 19114cc111

View File

@ -2676,7 +2676,6 @@ gnucash_sheet_tooltip (GtkWidget *widget, gint x, gint y,
gpointer user_data)
{
GnucashSheet *sheet = GNUCASH_SHEET (widget);
GnucashCursor *cursor = sheet->cursor;
Table *table = sheet->table;
VirtualLocation virt_loc;
gchar *tooltip_text;
@ -2716,7 +2715,7 @@ gnucash_sheet_tooltip (GtkWidget *widget, gint x, gint y,
by = block->origin_y;
// get the cell location and dimensions
gnucash_sheet_style_get_cell_pixel_rel_coords (cursor->style,
gnucash_sheet_style_get_cell_pixel_rel_coords (block->style,
virt_loc.phys_row_offset, virt_loc.phys_col_offset,
&cx, &cy, &cw, &ch);