9736: Export options 'Preview' buttons create hidden quickreport.

This commit is contained in:
SNoiraud 2016-10-16 22:32:09 +02:00
parent 7b183fc79c
commit 2f1f1f1b1e

View File

@ -55,9 +55,11 @@ _WIDTH_IN_CHARS = 72
class DisplayBuf(ManagedWindow): class DisplayBuf(ManagedWindow):
def __init__(self, title, document, modal=False): def __init__(self, title, document, modal=False):
self.title = title self.title = title
last_managed_window = document.uistate.gwm.window_tree[-1]
ManagedWindow.__init__(self, document.uistate, [], ManagedWindow.__init__(self, document.uistate, [],
document) 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, Gtk.DialogFlags.DESTROY_WITH_PARENT,
(_('_Close'), Gtk.ResponseType.CLOSE)), (_('_Close'), Gtk.ResponseType.CLOSE)),
None, title) None, title)