generated from itdominator/Python-With-Gtk-Template
Resolving additional focus problems from prior commit
This commit is contained in:
parent
6fa201709b
commit
30ab5305ca
@ -78,8 +78,7 @@ class EditorEventsMixin:
|
||||
if self.get_n_pages() == 0:
|
||||
self.hide()
|
||||
|
||||
notebook.set_current_page(-1)
|
||||
page.get_children()[0].grab_focus()
|
||||
self.set_page_focus_after_move(page, notebook)
|
||||
|
||||
def keyboard_move_tab_to_2(self, page_num):
|
||||
if self.NAME == "notebook_2":
|
||||
@ -96,8 +95,14 @@ class EditorEventsMixin:
|
||||
notebook.show()
|
||||
notebook.insert_page(page, tab, -1)
|
||||
|
||||
self.set_page_focus_after_move(page, notebook)
|
||||
|
||||
def set_page_focus_after_move(self, page, notebook):
|
||||
self.is_editor_focused = False
|
||||
notebook.set_current_page(-1)
|
||||
page.get_children()[0].grab_focus()
|
||||
notebook.is_editor_focused = True
|
||||
|
||||
|
||||
def keyboard_move_tab_left(self, page_num):
|
||||
page = self.get_nth_page(page_num)
|
||||
|
Loading…
Reference in New Issue
Block a user