mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
ESC key was not working on load of Scheduled Transaction Editor
This is due to trying to grab focus on the sheet when it was not realized so add a check for the sheet being realized before grabbing focus on it.
This commit is contained in:
parent
b9789b66ca
commit
4e653729ba
@ -1800,9 +1800,9 @@ gnc_split_reg_focus_on_sheet (GNCSplitReg *gsr)
|
||||
GnucashRegister *reg = gsr->reg;
|
||||
GnucashSheet *sheet = gnucash_register_get_sheet (reg);
|
||||
|
||||
// Make sure the sheet is the focus
|
||||
if (!gtk_widget_has_focus(GTK_WIDGET (sheet)))
|
||||
gtk_widget_grab_focus (GTK_WIDGET (sheet));
|
||||
// Make sure the sheet is the focus only when it is realized
|
||||
if (!gtk_widget_has_focus(GTK_WIDGET(sheet)) && gtk_widget_get_realized (GTK_WIDGET(sheet)))
|
||||
gtk_widget_grab_focus (GTK_WIDGET(sheet));
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user