forked from openlp/openlp
Reset dialogs on Cancel and minor cleanups
bzr-revno: 1548
This commit is contained in:
commit
1ea9c51c20
@ -50,7 +50,6 @@ class SettingsTab(QtGui.QWidget):
|
||||
self.setupUi()
|
||||
self.retranslateUi()
|
||||
self.initialise()
|
||||
self.preLoad()
|
||||
self.load()
|
||||
|
||||
def setupUi(self):
|
||||
@ -86,12 +85,6 @@ class SettingsTab(QtGui.QWidget):
|
||||
left_width = max(left_width, self.leftColumn.minimumSizeHint().width())
|
||||
self.leftColumn.setFixedWidth(left_width)
|
||||
|
||||
def preLoad(self):
|
||||
"""
|
||||
Setup the tab's interface.
|
||||
"""
|
||||
pass
|
||||
|
||||
def retranslateUi(self):
|
||||
"""
|
||||
Setup the interface translation strings.
|
||||
@ -118,9 +111,9 @@ class SettingsTab(QtGui.QWidget):
|
||||
|
||||
def cancel(self):
|
||||
"""
|
||||
Reset any settings
|
||||
Reset any settings if cancel pressed
|
||||
"""
|
||||
pass
|
||||
self.load()
|
||||
|
||||
def postSetUp(self, postUpdate=False):
|
||||
"""
|
||||
|
@ -47,7 +47,7 @@ class DisplayTagForm(QtGui.QDialog, Ui_DisplayTagDialog):
|
||||
"""
|
||||
QtGui.QDialog.__init__(self, parent)
|
||||
self.setupUi(self)
|
||||
self.preLoad()
|
||||
self._loadDisplayTags()
|
||||
QtCore.QObject.connect(self.tagTableWidget,
|
||||
QtCore.SIGNAL(u'clicked(QModelIndex)'), self.onRowSelected)
|
||||
QtCore.QObject.connect(self.defaultPushButton,
|
||||
@ -66,12 +66,12 @@ class DisplayTagForm(QtGui.QDialog, Ui_DisplayTagDialog):
|
||||
Load Display and set field state.
|
||||
"""
|
||||
# Create initial copy from master
|
||||
self.preLoad()
|
||||
self._loadDisplayTags()
|
||||
self._resetTable()
|
||||
self.selected = -1
|
||||
return QtGui.QDialog.exec_(self)
|
||||
|
||||
def preLoad(self):
|
||||
def _loadDisplayTags(self):
|
||||
"""
|
||||
Load the Tags from store so can be used in the system or used to
|
||||
update the display. If Cancel was selected this is needed to reset the
|
||||
|
Loading…
Reference in New Issue
Block a user