googol has proposed merging lp:~googol-hush/openlp/trivial into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)


When you delete an image from the service manager item the next image is 
selected.
-- 
https://code.launchpad.net/~googol-hush/openlp/trivial/+merge/28562
Your team OpenLP Core is requested to review the proposed merge of 
lp:~googol-hush/openlp/trivial into lp:openlp.
=== modified file 'openlp/core/ui/serviceitemeditform.py'
--- openlp/core/ui/serviceitemeditform.py	2010-06-25 18:18:52 +0000
+++ openlp/core/ui/serviceitemeditform.py	2010-06-26 16:20:43 +0000
@@ -88,9 +88,13 @@
         """
         items = self.listWidget.selectedItems()
         for item in items:
-            row =  self.listWidget.row(item)
+            row = self.listWidget.row(item)
             self.itemList.remove(self.itemList[row])
             self.loadData()
+            if row == self.listWidget.count():
+                self.listWidget.setCurrentRow(row - 1)
+            else:
+                self.listWidget.setCurrentRow(row)
 
     def onItemUp(self):
         """
@@ -98,7 +102,7 @@
         """
         items = self.listWidget.selectedItems()
         for item in items:
-            row =  self.listWidget.row(item)
+            row = self.listWidget.row(item)
             if row > 0:
                 temp = self.itemList[row]
                 self.itemList.remove(self.itemList[row])
@@ -112,7 +116,7 @@
         """
         items = self.listWidget.selectedItems()
         for item in items:
-            row =  self.listWidget.row(item)
+            row = self.listWidget.row(item)
             if row < len(self.itemList) and row is not -1:
                 temp = self.itemList[row]
                 self.itemList.remove(self.itemList[row])

_______________________________________________
Mailing list: https://launchpad.net/~openlp-core
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp

Reply via email to