summaryrefslogtreecommitdiffstats
path: root/comps.py
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>2000-08-23 19:08:21 +0000
committerErik Troan <ewt@redhat.com>2000-08-23 19:08:21 +0000
commitbd204deddc3a44d7b64365beb1447381269c1b1b (patch)
tree3e7b5273e734d72be4b1b01e5f6f07435e9c1639 /comps.py
parent9509b0656a5811cefa5620173b48ec15cd9a30a8 (diff)
downloadanaconda-bd204deddc3a44d7b64365beb1447381269c1b1b.tar.gz
anaconda-bd204deddc3a44d7b64365beb1447381269c1b1b.tar.xz
anaconda-bd204deddc3a44d7b64365beb1447381269c1b1b.zip
simplified selection count's on components; seem correct now
Diffstat (limited to 'comps.py')
-rw-r--r--comps.py22
1 files changed, 2 insertions, 20 deletions
diff --git a/comps.py b/comps.py
index d1b4b60b9..ccd0ec697 100644
--- a/comps.py
+++ b/comps.py
@@ -172,19 +172,6 @@ class Component:
def select(self, forInclude = 0):
if forInclude:
self.selectionCount = self.selectionCount + 1
- if self.manuallySelected or self.selectionCount > 1:
- # We're already selected -- no need to redo the work
- return
- else:
- alreadySelected = self.manuallySelected or self.selectionCount
- self.manuallySelected = 1
-
- if alreadySelected:
- # We're already selected -- no need to redo the work
- return
-
- if forInclude:
- self.selectionCount = 1
else:
self.manuallySelected = 1
@@ -202,15 +189,10 @@ class Component:
return self.manuallySelected or (self.selectionCount > 0)
def unselect(self, forInclude = 0):
- if not forInclude and not self.manuallySelected:
- # redundant manual deselection
- return
- elif forInclude and not self.selectionCount:
- # redundant include deselection
- return
-
if forInclude:
self.selectionCount = self.selectionCount - 1
+ if self.selectionCount < 0:
+ self.selectCount = 0
else:
self.manuallySelected = 0