diff options
author | Erik Troan <ewt@redhat.com> | 2000-08-23 19:08:21 +0000 |
---|---|---|
committer | Erik Troan <ewt@redhat.com> | 2000-08-23 19:08:21 +0000 |
commit | bd204deddc3a44d7b64365beb1447381269c1b1b (patch) | |
tree | 3e7b5273e734d72be4b1b01e5f6f07435e9c1639 /comps.py | |
parent | 9509b0656a5811cefa5620173b48ec15cd9a30a8 (diff) | |
download | anaconda-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.py | 22 |
1 files changed, 2 insertions, 20 deletions
@@ -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 |