Record active_view in set_active_view immediately, otherwise it may not be set until much later when newly created view is realized

This commit is contained in:
Yevgen Muntyan 2011-01-14 02:42:44 -08:00
parent 288519c4a4
commit 9271a3aec3

View File

@ -2553,6 +2553,7 @@ moo_edit_window_set_active_view (MooEditWindow *window,
page = get_view_page_num (window, view, &notebook); page = get_view_page_num (window, view, &notebook);
g_return_if_fail (page >= 0); g_return_if_fail (page >= 0);
window->priv->active_view = view;
moo_notebook_set_current_page (notebook, page); moo_notebook_set_current_page (notebook, page);
gtk_widget_grab_focus (GTK_WIDGET (view)); gtk_widget_grab_focus (GTK_WIDGET (view));
} }