1780: End of Line Report options window - changing Output Format cause change active tab to "report options"

This also happens on every other report, of course.
(This has already been committed to trunk and gramps34.)


svn: r22392
This commit is contained in:
Paul Franklin 2013-05-21 17:41:23 +00:00
parent 6868c08ba7
commit 7992928798

View File

@ -3,7 +3,7 @@
# #
# Copyright (C) 2007 Brian G. Matherly # Copyright (C) 2007 Brian G. Matherly
# Copyright (C) 2010 Jakim Friant # Copyright (C) 2010 Jakim Friant
# Copyright (C) 2012 Paul Franklin # Copyright (C) 2012-2013 Paul Franklin
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@ -77,7 +77,7 @@ class DocReportDialog(ReportDialog):
def init_interface(self): def init_interface(self):
ReportDialog.init_interface(self) ReportDialog.init_interface(self)
self.doc_type_changed(self.format_menu) self.doc_type_changed(self.format_menu, preserve_tab=False)
#------------------------------------------------------------------------ #------------------------------------------------------------------------
# #
@ -107,7 +107,7 @@ class DocReportDialog(ReportDialog):
self.options.set_document(self.doc) self.options.set_document(self.doc)
def doc_type_changed(self, obj): def doc_type_changed(self, obj, preserve_tab=True):
"""This routine is called when the user selects a new file """This routine is called when the user selects a new file
format for the report. It adjusts the various dialog sections format for the report. It adjusts the various dialog sections
to reflect the appropriate values for the currently selected to reflect the appropriate values for the currently selected
@ -123,6 +123,7 @@ class DocReportDialog(ReportDialog):
# Is this to be a printed report or an electronic report # Is this to be a printed report or an electronic report
# (i.e. a set of web pages) # (i.e. a set of web pages)
old_page = self.notebook.get_current_page()
if self.firstpage_added: if self.firstpage_added:
self.notebook.remove_page(0) self.notebook.remove_page(0)
if docgen_plugin.get_paper_used(): if docgen_plugin.get_paper_used():
@ -135,6 +136,8 @@ class DocReportDialog(ReportDialog):
self.html_label.set_use_markup(True) self.html_label.set_use_markup(True)
self.notebook.insert_page(self.html_table, self.html_label, 0) self.notebook.insert_page(self.html_table, self.html_label, 0)
self.html_table.show_all() self.html_table.show_all()
if preserve_tab:
self.notebook.set_current_page(old_page)
self.firstpage_added = True self.firstpage_added = True
ext_val = docgen_plugin.get_extension() ext_val = docgen_plugin.get_extension()