mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-31 01:11:35 +00:00
QMessageBox is a top-level window
This commit is contained in:
parent
c160a99ebc
commit
e2627e0944
1 changed files with 2 additions and 1 deletions
|
@ -148,9 +148,10 @@ class CancelButton(QPushButton):
|
||||||
class MessageBoxMixin(object):
|
class MessageBoxMixin(object):
|
||||||
def top_level_window(self, window=None):
|
def top_level_window(self, window=None):
|
||||||
window = window or self
|
window = window or self
|
||||||
|
classes = (WindowModalDialog, QMessageBox)
|
||||||
for n, child in enumerate(window.children()):
|
for n, child in enumerate(window.children()):
|
||||||
# Test for visibility as old closed dialogs may not be GC-ed
|
# Test for visibility as old closed dialogs may not be GC-ed
|
||||||
if isinstance(child, WindowModalDialog) and child.isVisible():
|
if isinstance(child, classes) and child.isVisible():
|
||||||
return self.top_level_window(child)
|
return self.top_level_window(child)
|
||||||
return window
|
return window
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue