forked from openlp/openlp
Fixes: 1065216 Alert display - Text dissapers of the edge of the screen
Fixes: 1065149 Clicking new or save disables buttons to display alert bzr-revno: 2083 Fixes: https://launchpad.net/bugs/1065216, https://launchpad.net/bugs/1065149
This commit is contained in:
commit
4dd0eea5de
@ -105,6 +105,7 @@ CSS = """
|
||||
font-size: %spt;
|
||||
color: %s;
|
||||
background-color: %s;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
"""
|
||||
|
||||
|
@ -80,6 +80,10 @@ class AlertForm(QtGui.QDialog, Ui_AlertDialog):
|
||||
item_name = QtGui.QListWidgetItem(alert.text)
|
||||
item_name.setData(QtCore.Qt.UserRole, QtCore.QVariant(alert.id))
|
||||
self.alertListWidget.addItem(item_name)
|
||||
if alert.text == unicode(self.alertTextEdit.text()):
|
||||
self.item_id = alert.id
|
||||
self.alertListWidget.setCurrentRow(
|
||||
self.alertListWidget.row(item_name))
|
||||
|
||||
def onDisplayClicked(self):
|
||||
self.triggerAlert(unicode(self.alertTextEdit.text()))
|
||||
@ -112,7 +116,6 @@ class AlertForm(QtGui.QDialog, Ui_AlertDialog):
|
||||
alert = AlertItem()
|
||||
alert.text = unicode(self.alertTextEdit.text())
|
||||
self.manager.save_object(alert)
|
||||
self.alertTextEdit.setText(u'')
|
||||
self.loadList()
|
||||
|
||||
def onSaveClick(self):
|
||||
@ -125,6 +128,7 @@ class AlertForm(QtGui.QDialog, Ui_AlertDialog):
|
||||
self.manager.save_object(alert)
|
||||
self.item_id = None
|
||||
self.loadList()
|
||||
self.saveButton.setEnabled(False)
|
||||
|
||||
def onTextChanged(self):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user