Also activate parent window when clicking in the category view

This commit is contained in:
Kovid Goyal 2022-04-25 19:41:46 +05:30
parent 6c8f462778
commit d6fd1f8293
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -732,6 +732,7 @@ class CharSelect(Dialog):
self.category_view = CategoryView(self) self.category_view = CategoryView(self)
self.category_view.setFocusPolicy(Qt.FocusPolicy.NoFocus) self.category_view.setFocusPolicy(Qt.FocusPolicy.NoFocus)
self.category_view.clicked.connect(self.category_view_clicked)
l.addWidget(s, 1, 0, 1, 3) l.addWidget(s, 1, 0, 1, 3)
self.char_view = CharView(self) self.char_view = CharView(self)
self.char_view.setFocusPolicy(Qt.FocusPolicy.NoFocus) self.char_view.setFocusPolicy(Qt.FocusPolicy.NoFocus)
@ -760,6 +761,11 @@ class CharSelect(Dialog):
l.addLayout(h, 4, 0, 1, 3) l.addLayout(h, 4, 0, 1, 3)
self.char_view.setFocus(Qt.FocusReason.OtherFocusReason) self.char_view.setFocus(Qt.FocusReason.OtherFocusReason)
def category_view_clicked(self):
p = self.parent()
if p is not None and p.focusWidget() is not None:
p.activateWindow()
def do_search(self): def do_search(self):
text = str(self.search.text()).strip() text = str(self.search.text()).strip()
if not text: if not text: