← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~googol-hush/openlp/gui into lp:openlp

 

Andreas Preikschat has proposed merging lp:~googol-hush/openlp/gui into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~googol-hush/openlp/gui/+merge/60810

Hello,

- Disable the drop in the SearchEdit
- Disable the drag in the MediaManager/ServiceManager if no item is selected.
-- 
https://code.launchpad.net/~googol-hush/openlp/gui/+merge/60810
Your team OpenLP Core is requested to review the proposed merge of lp:~googol-hush/openlp/gui into lp:openlp.
=== modified file 'openlp/core/lib/listwidgetwithdnd.py'
--- openlp/core/lib/listwidgetwithdnd.py	2011-03-24 19:04:02 +0000
+++ openlp/core/lib/listwidgetwithdnd.py	2011-05-12 15:53:27 +0000
@@ -49,6 +49,9 @@
         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)

=== modified file 'openlp/core/lib/searchedit.py'
--- openlp/core/lib/searchedit.py	2011-05-04 07:29:16 +0000
+++ openlp/core/lib/searchedit.py	2011-05-12 15:53:27 +0000
@@ -62,6 +62,7 @@
             self._onSearchEditTextChanged
         )
         self._updateStyleSheet()
+        self.setAcceptDrops(False)
 
     def _updateStyleSheet(self):
         """

=== modified file 'openlp/core/ui/servicemanager.py'
--- openlp/core/ui/servicemanager.py	2011-05-06 22:00:52 +0000
+++ openlp/core/ui/servicemanager.py	2011-05-12 15:53:27 +0000
@@ -73,6 +73,9 @@
         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)


Follow ups