diff options
author | Florian Bruhin <git@the-compiler.org> | 2017-03-02 18:41:28 +0100 |
---|---|---|
committer | Florian Bruhin <git@the-compiler.org> | 2017-03-02 18:42:34 +0100 |
commit | ec969e2da24de51a5a1eb5d864b037317af7d13f (patch) | |
tree | 47f6df12a2b21bb54fde86c130c440ca927146de | |
parent | a5c3c49e8ce6beba98c2a538169d308a3e48df7d (diff) | |
download | qutebrowser-ec969e2da24de51a5a1eb5d864b037317af7d13f.tar.gz qutebrowser-ec969e2da24de51a5a1eb5d864b037317af7d13f.zip |
Set tab as parent for print dialogs
Fixes #2366
(cherry picked from commit 477539f4bab39122dbee82cfc77b583f871793fd)
-rw-r--r-- | CHANGELOG.asciidoc | 1 | ||||
-rw-r--r-- | qutebrowser/browser/commands.py | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 4e96af7bc..36656b3df 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -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 ------- diff --git a/qutebrowser/browser/commands.py b/qutebrowser/browser/commands.py index a3bdd2a23..d728afa55 100644 --- a/qutebrowser/browser/commands.py +++ b/qutebrowser/browser/commands.py @@ -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)) |