mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
* src/register/register-gnome/gnucash-sheet.c: fix a fencepost
error where it assumed there would be at least two "visible rows" per block, so search through the end rather than skipping the last row. This fixes the page-up/page-down problem with invoices. Also add more places where the visible range is computed. * src/business/business-ledger/gncEntryLedgerLoad.c: add code to "show_range()" which should fix the page-up/page-down problem. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7838 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
da1597b40d
commit
2e06f31717
@ -44,6 +44,15 @@
|
|||||||
* src/backend/postgres/test/Makefile.am: include run-tests.sh in
|
* src/backend/postgres/test/Makefile.am: include run-tests.sh in
|
||||||
the distribution.
|
the distribution.
|
||||||
|
|
||||||
|
* src/register/register-gnome/gnucash-sheet.c: fix a fencepost
|
||||||
|
error where it assumed there would be at least two "visible
|
||||||
|
rows" per block, so search through the end rather than skipping
|
||||||
|
the last row. This fixes the page-up/page-down problem with
|
||||||
|
invoices. Also add more places where the visible range is computed.
|
||||||
|
|
||||||
|
* src/business/business-ledger/gncEntryLedgerLoad.c: add code to
|
||||||
|
"show_range()" which should fix the page-up/page-down problem.
|
||||||
|
|
||||||
2003-01-14 Derek Atkins <derek@ihtfp.com>
|
2003-01-14 Derek Atkins <derek@ihtfp.com>
|
||||||
|
|
||||||
* src/engine/QueryNew.h: add QUERY_PARAM_ACTIVE
|
* src/engine/QueryNew.h: add QUERY_PARAM_ACTIVE
|
||||||
|
@ -140,6 +140,20 @@ static void load_taxtable_type_cells (GncEntryLedger *ledger)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gnc_entry_ledger_show_entry (GncEntryLedger *ledger,
|
||||||
|
VirtualCellLocation start_loc)
|
||||||
|
{
|
||||||
|
VirtualCellLocation end_loc;
|
||||||
|
int v_row;
|
||||||
|
|
||||||
|
end_loc = start_loc;
|
||||||
|
v_row = end_loc.virt_row + 1;
|
||||||
|
end_loc.virt_row = MIN (v_row, ledger->table->num_virt_rows - 1);
|
||||||
|
|
||||||
|
gnc_table_show_range (ledger->table, start_loc, end_loc);
|
||||||
|
}
|
||||||
|
|
||||||
void gnc_entry_ledger_load_xfer_cells (GncEntryLedger *ledger)
|
void gnc_entry_ledger_load_xfer_cells (GncEntryLedger *ledger)
|
||||||
{
|
{
|
||||||
load_xfer_type_cells (ledger);
|
load_xfer_type_cells (ledger);
|
||||||
@ -388,8 +402,7 @@ void gnc_entry_ledger_load (GncEntryLedger *ledger, GList *entry_list)
|
|||||||
|
|
||||||
|
|
||||||
gnc_table_refresh_gui (table, TRUE);
|
gnc_table_refresh_gui (table, TRUE);
|
||||||
|
gnc_entry_ledger_show_entry (ledger, table->current_cursor_loc.vcell_loc);
|
||||||
/* Show_entry ??? */
|
|
||||||
|
|
||||||
/* Set completion character */
|
/* Set completion character */
|
||||||
gnc_combo_cell_set_complete_char
|
gnc_combo_cell_set_complete_char
|
||||||
@ -404,7 +417,4 @@ void gnc_entry_ledger_load (GncEntryLedger *ledger, GList *entry_list)
|
|||||||
|
|
||||||
/* enable callback for cursor user-driven moves */
|
/* enable callback for cursor user-driven moves */
|
||||||
gnc_table_control_allow_move (table->control, TRUE);
|
gnc_table_control_allow_move (table->control, TRUE);
|
||||||
|
|
||||||
/* Set the confirmation callbacks and load the combo cells */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -313,7 +313,7 @@ gnucash_sheet_y_pixel_to_block (GnucashSheet *sheet, int y)
|
|||||||
VirtualCellLocation vcell_loc = { 1, 0 };
|
VirtualCellLocation vcell_loc = { 1, 0 };
|
||||||
|
|
||||||
for (;
|
for (;
|
||||||
vcell_loc.virt_row < sheet->num_virt_rows - 1;
|
vcell_loc.virt_row < sheet->num_virt_rows;
|
||||||
vcell_loc.virt_row++)
|
vcell_loc.virt_row++)
|
||||||
{
|
{
|
||||||
SheetBlock *block;
|
SheetBlock *block;
|
||||||
@ -352,7 +352,7 @@ gnucash_sheet_compute_visible_range (GnucashSheet *sheet)
|
|||||||
sheet->num_visible_phys_rows = 0;
|
sheet->num_visible_phys_rows = 0;
|
||||||
|
|
||||||
for ( vcell_loc.virt_row = sheet->top_block, vcell_loc.virt_col = 0;
|
for ( vcell_loc.virt_row = sheet->top_block, vcell_loc.virt_col = 0;
|
||||||
vcell_loc.virt_row < sheet->num_virt_rows - 1;
|
vcell_loc.virt_row < sheet->num_virt_rows;
|
||||||
vcell_loc.virt_row++ )
|
vcell_loc.virt_row++ )
|
||||||
{
|
{
|
||||||
SheetBlock *block;
|
SheetBlock *block;
|
||||||
@ -405,8 +405,10 @@ gnucash_sheet_show_row (GnucashSheet *sheet, gint virt_row)
|
|||||||
y = block->origin_y;
|
y = block->origin_y;
|
||||||
block_height = block->style->dimensions->height;
|
block_height = block->style->dimensions->height;
|
||||||
|
|
||||||
if ((cy <= y) && (cy + height >= y + block_height))
|
if ((cy <= y) && (cy + height >= y + block_height)) {
|
||||||
|
gnucash_sheet_compute_visible_range (sheet);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (y > cy)
|
if (y > cy)
|
||||||
y -= height - MIN (block_height, height);
|
y -= height - MIN (block_height, height);
|
||||||
@ -477,8 +479,10 @@ gnucash_sheet_show_range (GnucashSheet *sheet,
|
|||||||
block_height = (end_block->origin_y +
|
block_height = (end_block->origin_y +
|
||||||
end_block->style->dimensions->height) - y;
|
end_block->style->dimensions->height) - y;
|
||||||
|
|
||||||
if ((cy <= y) && (cy + height >= y + block_height))
|
if ((cy <= y) && (cy + height >= y + block_height)) {
|
||||||
|
gnucash_sheet_compute_visible_range (sheet);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (y > cy)
|
if (y > cy)
|
||||||
y -= height - MIN (block_height, height);
|
y -= height - MIN (block_height, height);
|
||||||
|
Loading…
Reference in New Issue
Block a user