openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #08633
[Merge] lp:~gerald-britton/openlp/tweaks into lp:openlp
jerryb has proposed merging lp:~gerald-britton/openlp/tweaks into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
For more details, see:
https://code.launchpad.net/~gerald-britton/openlp/tweaks/+merge/60107
Change a series of "if action ..." into if action .../elif action .../elif action ...
Benefit: Current code unnecessarily executes all the if statements in the section. Since "action" can satisfy at most one of the conditions, the following if statements are redundant.
Note: If the RHS of the expressions are not unique, this patch is totally bogus!
--
https://code.launchpad.net/~gerald-britton/openlp/tweaks/+merge/60107
Your team OpenLP Core is requested to review the proposed merge of lp:~gerald-britton/openlp/tweaks into lp:openlp.
=== modified file 'openlp/core/ui/servicemanager.py'
--- openlp/core/ui/servicemanager.py 2011-04-29 08:45:36 +0000
+++ openlp/core/ui/servicemanager.py 2011-05-05 18:45:58 +0000
@@ -676,17 +676,17 @@
action = self.menu.exec_(self.serviceManagerList.mapToGlobal(point))
if action == self.editAction:
self.remoteEdit()
- if action == self.maintainAction:
+ elif action == self.maintainAction:
self.onServiceItemEditForm()
- if action == self.deleteAction:
+ elif action == self.deleteAction:
self.onDeleteFromService()
- if action == self.notesAction:
+ elif action == self.notesAction:
self.onServiceItemNoteForm()
- if action == self.timeAction:
+ elif action == self.timeAction:
self.onStartTimeForm()
- if action == self.previewAction:
+ elif action == self.previewAction:
self.makePreview()
- if action == self.liveAction:
+ elif action == self.liveAction:
self.makeLive()
def onServiceItemNoteForm(self):
Follow ups