mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Fix cursor positioning bug.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3608 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
2740f11b2a
commit
b4219c2835
@ -1,5 +1,5 @@
|
||||
/********************************************************************\
|
||||
* gnucash-item-edit.c -- cell editor cut-npaste from gnumeric *
|
||||
* gnucash-item-edit.c -- cell editor cut-n-paste from gnumeric *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU General Public License as *
|
||||
@ -23,6 +23,8 @@
|
||||
/*
|
||||
* An editor for the gnucash sheet.
|
||||
* Cut and pasted from the gnumeric item-edit.c file.
|
||||
*
|
||||
* And then substantially rewritten by Dave Peticolas <dave@krondo.com>.
|
||||
*/
|
||||
|
||||
|
||||
@ -220,7 +222,7 @@ item_edit_draw_info (ItemEdit *item_edit, int x, int y, TextDrawInfo *info)
|
||||
{
|
||||
case CELL_ALIGN_RIGHT:
|
||||
xoffset = info->text_rect.width -
|
||||
(2*CELL_HPADDING + total_width);
|
||||
(CELL_HPADDING + total_width);
|
||||
if (xoffset > 0)
|
||||
break;
|
||||
|
||||
@ -714,7 +716,8 @@ item_edit_set_cursor_pos (ItemEdit *item_edit,
|
||||
|
||||
editable = GTK_EDITABLE (item_edit->editor);
|
||||
|
||||
if (changed_cells) {
|
||||
if (changed_cells)
|
||||
{
|
||||
CellAlignment align;
|
||||
|
||||
align = gnc_table_get_align (table, item_edit->virt_loc);
|
||||
@ -723,9 +726,12 @@ item_edit_set_cursor_pos (ItemEdit *item_edit,
|
||||
gtk_editable_set_position(editable, -1);
|
||||
else
|
||||
gtk_editable_set_position(editable, 0);
|
||||
|
||||
if (item_edit->is_popup)
|
||||
x -= item_edit->popup_toggle.toggle_offset;
|
||||
}
|
||||
|
||||
item_edit_draw_info(item_edit, o_x, o_y, &info);
|
||||
item_edit_draw_info (item_edit, o_x, o_y, &info);
|
||||
|
||||
if (info.text_1 == NULL)
|
||||
{
|
||||
|
@ -1248,14 +1248,14 @@ gnucash_button_press_event (GtkWidget *widget, GdkEventButton *event)
|
||||
GNC_TABLE_TRAVERSE_POINTER,
|
||||
&new_virt_loc);
|
||||
|
||||
gnucash_sheet_check_grab(sheet);
|
||||
gnucash_sheet_check_grab (sheet);
|
||||
|
||||
if (abort_move)
|
||||
return TRUE;
|
||||
|
||||
changed_cells = gnucash_sheet_cursor_move(sheet, new_virt_loc);
|
||||
changed_cells = gnucash_sheet_cursor_move (sheet, new_virt_loc);
|
||||
|
||||
gnucash_sheet_check_grab(sheet);
|
||||
gnucash_sheet_check_grab (sheet);
|
||||
|
||||
gnucash_cursor_get_virt (GNUCASH_CURSOR(sheet->cursor), &new_virt_loc);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user