mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Fix combocell when using action field
When using type-ahead, it clears the tmp_store in gnc_combo_cell_enter so clearing the action list. Change this to only clear the tmp_store when using quickfill or type-ahead.
This commit is contained in:
parent
f2a13ecac7
commit
1502951801
@ -641,7 +641,7 @@ gnc_combo_cell_modify_verify (BasicCell* _cell,
|
||||
*cursor_position += change_chars;
|
||||
box_str = match_str;
|
||||
}
|
||||
else
|
||||
else if (cell->shared_store)
|
||||
{
|
||||
// No start-of-name match, try type-ahead search, we match any substring of the full account name.
|
||||
GtkListStore *store = cell->shared_store;
|
||||
@ -655,7 +655,7 @@ gnc_combo_cell_modify_verify (BasicCell* _cell,
|
||||
|
||||
if (match_str == NULL)
|
||||
{
|
||||
if (gnc_item_list_using_temp (box->item_list))
|
||||
if (cell->shared_store && gnc_item_list_using_temp (box->item_list))
|
||||
{
|
||||
block_list_signals (cell); //Prevent recursion
|
||||
gnc_item_list_set_temp_store (box->item_list, NULL);
|
||||
@ -666,6 +666,8 @@ gnc_combo_cell_modify_verify (BasicCell* _cell,
|
||||
block_list_signals (cell);
|
||||
gnc_item_list_select (box->item_list, NULL);
|
||||
unblock_list_signals (cell);
|
||||
*cursor_position = *start_selection = newval_chars;
|
||||
*end_selection = -1;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -980,9 +982,13 @@ gnc_combo_cell_enter (BasicCell* bcell,
|
||||
popup_get_width, box);
|
||||
|
||||
block_list_signals (cell);
|
||||
// Clear the temp store to ensure we don't start in type-ahead mode.
|
||||
gnc_item_list_set_temp_store (box->item_list, NULL);
|
||||
gtk_list_store_clear (box->tmp_store);
|
||||
|
||||
if (cell->shared_store && gnc_item_list_using_temp (box->item_list))
|
||||
{
|
||||
// Clear the temp store to ensure we don't start in type-ahead mode.
|
||||
gnc_item_list_set_temp_store (box->item_list, NULL);
|
||||
gtk_list_store_clear (box->tmp_store);
|
||||
}
|
||||
gnc_item_list_select (box->item_list, bcell->value);
|
||||
unblock_list_signals (cell);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user