forked from openlp/openlp
- Disable the drop in the SearchEdit
- Disable the drag in the MediaManager/ServiceManager if no item is selected. bzr-revno: 1536
This commit is contained in:
commit
2bb59f7051
@ -49,6 +49,9 @@ class ListWidgetWithDnD(QtGui.QListWidget):
|
||||
if event.buttons() != QtCore.Qt.LeftButton:
|
||||
event.ignore()
|
||||
return
|
||||
if not self.selectedItems():
|
||||
event.ignore()
|
||||
return
|
||||
drag = QtGui.QDrag(self)
|
||||
mimeData = QtCore.QMimeData()
|
||||
drag.setMimeData(mimeData)
|
||||
|
@ -62,6 +62,7 @@ class SearchEdit(QtGui.QLineEdit):
|
||||
self._onSearchEditTextChanged
|
||||
)
|
||||
self._updateStyleSheet()
|
||||
self.setAcceptDrops(False)
|
||||
|
||||
def _updateStyleSheet(self):
|
||||
"""
|
||||
|
@ -73,6 +73,9 @@ class ServiceManagerList(QtGui.QTreeWidget):
|
||||
if event.buttons() != QtCore.Qt.LeftButton:
|
||||
event.ignore()
|
||||
return
|
||||
if not self.selectedItems():
|
||||
event.ignore()
|
||||
return
|
||||
drag = QtGui.QDrag(self)
|
||||
mimeData = QtCore.QMimeData()
|
||||
drag.setMimeData(mimeData)
|
||||
|
Loading…
Reference in New Issue
Block a user