Set tab as parent for print dialogs

Fixes #2366
This commit is contained in:
Florian Bruhin 2017-03-02 18:41:28 +01:00
parent ea653e6fe4
commit 56ab02f54d
2 changed files with 3 additions and 2 deletions

View File

@ -31,6 +31,7 @@ Fixed
- Hinting a input now doesn't select existing text anymore with QtWebKit
- The cursor now moves to the end when input elements are selected with QtWebEngine
- Download suffixes like (1) are now correctly stripped with QtWebEngine
- Crash when trying to print a tab which was closed in the meantime
v0.10.0
-------

View File

@ -350,7 +350,7 @@ class CommandDispatcher:
message.error("Printing failed!")
tab.printing.check_preview_support()
diag = QPrintPreviewDialog()
diag = QPrintPreviewDialog(tab)
diag.setAttribute(Qt.WA_DeleteOnClose)
diag.setWindowFlags(diag.windowFlags() | Qt.WindowMaximizeButtonHint |
Qt.WindowMinimizeButtonHint)
@ -376,7 +376,7 @@ class CommandDispatcher:
message.error("Printing failed!")
diag.deleteLater()
diag = QPrintDialog()
diag = QPrintDialog(tab)
diag.open(lambda: tab.printing.to_printer(diag.printer(),
print_callback))