forked from openlp/openlp
Only set tab_visited when the tab is visited and not on loading
This commit is contained in:
parent
77fca59e57
commit
d11cb1d622
@ -135,4 +135,4 @@ class SettingsTab(QtWidgets.QWidget, RegistryProperties):
|
||||
"""
|
||||
Tab has just been made visible to the user
|
||||
"""
|
||||
self.tab_visited = True
|
||||
pass
|
||||
|
@ -60,7 +60,8 @@ class SettingsForm(QtWidgets.QDialog, Ui_SettingsDialog, RegistryProperties):
|
||||
"""
|
||||
Execute the form
|
||||
"""
|
||||
# load all the settings
|
||||
# load all the
|
||||
self.setting_list_widget.blockSignals(True)
|
||||
self.setting_list_widget.clear()
|
||||
while self.stacked_layout.count():
|
||||
# take at 0 and the rest shuffle up.
|
||||
@ -74,6 +75,7 @@ class SettingsForm(QtWidgets.QDialog, Ui_SettingsDialog, RegistryProperties):
|
||||
if plugin.settings_tab:
|
||||
self.insert_tab(plugin.settings_tab, plugin.is_active())
|
||||
self.setting_list_widget.setCurrentRow(0)
|
||||
self.setting_list_widget.blockSignals(False)
|
||||
return QtWidgets.QDialog.exec(self)
|
||||
|
||||
def insert_tab(self, tab_widget, is_visible=True):
|
||||
@ -177,6 +179,7 @@ class SettingsForm(QtWidgets.QDialog, Ui_SettingsDialog, RegistryProperties):
|
||||
# Check that the title of the tab (i.e. plugin name) is the same as the data in the list item
|
||||
if tab_widget.tab_title == list_item.data(QtCore.Qt.UserRole):
|
||||
# Make the matching tab visible
|
||||
tab_widget.tab_visited = True
|
||||
self.stacked_layout.setCurrentIndex(tab_index)
|
||||
self.stacked_layout.currentWidget().tab_visible()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user