From 850685c3ef6bd79ece6dae74ec6376c55e27b281 Mon Sep 17 00:00:00 2001 From: SNoiraud Date: Sun, 16 Oct 2016 22:41:10 +0200 Subject: [PATCH] 9736: Export options 'Preview' buttons create hidden quickreport. --- gramps/gui/plug/quick/_textbufdoc.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gramps/gui/plug/quick/_textbufdoc.py b/gramps/gui/plug/quick/_textbufdoc.py index 13481466a..7dfb8b6c5 100644 --- a/gramps/gui/plug/quick/_textbufdoc.py +++ b/gramps/gui/plug/quick/_textbufdoc.py @@ -55,9 +55,11 @@ _WIDTH_IN_CHARS = 72 class DisplayBuf(ManagedWindow): def __init__(self, title, document, modal=False): self.title = title + last_managed_window = document.uistate.gwm.window_tree[-1] ManagedWindow.__init__(self, document.uistate, [], document) - self.set_window(Gtk.Dialog("",document.uistate.window, + # We set the parent to the last managed window (transient_for) + self.set_window(Gtk.Dialog("",last_managed_window, Gtk.DialogFlags.DESTROY_WITH_PARENT, (_('_Close'), Gtk.ResponseType.CLOSE)), None, title)