mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug 797845 - Backspace key produces incorrect result
gnucash_sheet_delete_cb should always reset the entry to the returned value because the combo-box manipulations might have reset it to the combo box value. Also always stop the delete signal because otherwise the gtk_entry delete handler will dupllicate the deletion.
This commit is contained in:
parent
15b540370a
commit
f6cd83a1d1
@ -1195,18 +1195,10 @@ gnucash_sheet_delete_cb (GtkWidget *widget,
|
||||
&start_sel, &end_sel,
|
||||
&sheet->input_cancelled);
|
||||
|
||||
if (retval && (strcmp (retval, new_text) != 0))
|
||||
{
|
||||
if (retval)
|
||||
gnucash_sheet_set_entry_value (sheet, retval);
|
||||
g_signal_stop_emission_by_name (G_OBJECT(sheet->entry),
|
||||
"delete_text");
|
||||
}
|
||||
else if (retval == NULL)
|
||||
{
|
||||
/* the entry was disallowed, so we stop the delete signal */
|
||||
g_signal_stop_emission_by_name (G_OBJECT(sheet->entry),
|
||||
"delete_text");
|
||||
}
|
||||
|
||||
g_signal_stop_emission_by_name (G_OBJECT(sheet->entry), "delete_text");
|
||||
|
||||
DEBUG ("%s", retval ? retval : "nothing");
|
||||
gnucash_sheet_set_position_and_selection (sheet, cursor_position,
|
||||
|
Loading…
Reference in New Issue
Block a user