openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #10859
[Merge] lp:~googol/openlp/trivial into lp:openlp
Andreas Preikschat has proposed merging lp:~googol/openlp/trivial into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
For more details, see:
https://code.launchpad.net/~googol/openlp/trivial/+merge/68147
Hello,
I made some changes to avoid setting the service to modified when not unnecessary.
When you used the up/down arrow the service was marked as modified. Also when you used the move down, move up, move to top, move to bottom and delete buttons the service was set to modified even when no item was selected.
--
https://code.launchpad.net/~googol/openlp/trivial/+merge/68147
Your team OpenLP Core is requested to review the proposed merge of lp:~googol/openlp/trivial into lp:openlp.
=== modified file 'openlp/core/ui/servicemanager.py'
--- openlp/core/ui/servicemanager.py 2011-07-10 12:07:10 +0000
+++ openlp/core/ui/servicemanager.py 2011-07-16 08:11:23 +0000
@@ -802,7 +802,6 @@
# Top Item was selected so set the last one
if setLastItem:
lastItem.setSelected(True)
- self.setModified()
def onMoveSelectionDown(self):
"""
@@ -824,7 +823,6 @@
serviceIterator += 1
if setSelected:
firstItem.setSelected(True)
- self.setModified()
def onCollapseAll(self):
"""
@@ -863,12 +861,12 @@
Move the current ServiceItem to the top of the list.
"""
item, child = self.findServiceItem()
- if item < len(self.serviceItems) and item is not -1:
+ if item < len(self.serviceItems) and item != -1:
temp = self.serviceItems[item]
self.serviceItems.remove(self.serviceItems[item])
self.serviceItems.insert(0, temp)
self.repaintServiceList(0, child)
- self.setModified()
+ self.setModified()
def onServiceUp(self):
"""
@@ -880,31 +878,31 @@
self.serviceItems.remove(self.serviceItems[item])
self.serviceItems.insert(item - 1, temp)
self.repaintServiceList(item - 1, child)
- self.setModified()
+ self.setModified()
def onServiceDown(self):
"""
Move the current ServiceItem one position down in the list.
"""
item, child = self.findServiceItem()
- if item < len(self.serviceItems) and item is not -1:
+ if item < len(self.serviceItems) and item != -1:
temp = self.serviceItems[item]
self.serviceItems.remove(self.serviceItems[item])
self.serviceItems.insert(item + 1, temp)
self.repaintServiceList(item + 1, child)
- self.setModified()
+ self.setModified()
def onServiceEnd(self):
"""
Move the current ServiceItem to the bottom of the list.
"""
item, child = self.findServiceItem()
- if item < len(self.serviceItems) and item is not -1:
+ if item < len(self.serviceItems) and item != -1:
temp = self.serviceItems[item]
self.serviceItems.remove(self.serviceItems[item])
self.serviceItems.insert(len(self.serviceItems), temp)
self.repaintServiceList(len(self.serviceItems) - 1, child)
- self.setModified()
+ self.setModified()
def onDeleteFromService(self):
"""
@@ -914,7 +912,7 @@
if item != -1:
self.serviceItems.remove(self.serviceItems[item])
self.repaintServiceList(item - 1, -1)
- self.setModified()
+ self.setModified()
def repaintServiceList(self, serviceItem, serviceItemChild):
"""
Follow ups