(self)
| 2268 | |
| 2269 | |
| 2270 | def select(self): |
| 2271 | choice = self.options[self.selpos] |
| 2272 | if choice == 'combination': |
| 2273 | self.values['arithmetic'] = False |
| 2274 | self.values['image'] = False |
| 2275 | self.values['audio2'] = False |
| 2276 | self.values['audio'] = True |
| 2277 | self.values['multi'].i = 0 # no multi mode |
| 2278 | elif choice == 'arithmetic': |
| 2279 | self.values['image'] = False |
| 2280 | self.values['audio'] = False |
| 2281 | self.values['audio2'] = False |
| 2282 | self.values['combination'] = False |
| 2283 | self.values['multi'].i = 0 |
| 2284 | elif choice == 'audio': |
| 2285 | self.values['arithmetic'] = False |
| 2286 | if self.values['audio']: |
| 2287 | self.values['combination'] = False |
| 2288 | self.values['audio2'] = False |
| 2289 | elif choice == 'audio2': |
| 2290 | self.values['audio'] = True |
| 2291 | self.values['combination'] = False |
| 2292 | self.values['arithmetic'] = False |
| 2293 | elif choice == 'image': |
| 2294 | self.values['combination'] = False |
| 2295 | self.values['arithmetic'] = False |
| 2296 | if self.values['multi'].value() > 1 and not self.values['image']: |
| 2297 | self.values['color'] = False |
| 2298 | self.values['multimode'].choose('color') |
| 2299 | elif choice == 'color': |
| 2300 | if self.values['multi'].value() > 1 and not self.values['color']: |
| 2301 | self.values['image'] = False |
| 2302 | self.values['multimode'].choose('image') |
| 2303 | elif choice == 'multi': |
| 2304 | self.values['arithmetic'] = False |
| 2305 | self.values['combination'] = False |
| 2306 | self.values[self.values['multimode'].value()] = False |
| 2307 | elif choice == 'multimode' and self.values['multi'].value() > 1: |
| 2308 | mm = self.values['multimode'].value() # what we're changing from |
| 2309 | notmm = (mm == 'image') and 'color' or 'image' # changing to |
| 2310 | self.values[mm] = self.values[notmm] |
| 2311 | self.values[notmm] = False |
| 2312 | |
| 2313 | |
| 2314 | Menu.select(self) |
| 2315 | modes = [k for k,v in self.values.items() if v] |
| 2316 | if not [v for k,v in self.values.items() |
| 2317 | if v and not k in ('crab', 'combination', 'variable')] \ |
| 2318 | or len(modes) == 1 and modes[0] in ['image', 'color']: |
| 2319 | self.values['position1'] = True |
| 2320 | self.update_labels() |
| 2321 | self.calc_mode() |
| 2322 | |
| 2323 | class ImageSelect(Menu): |
| 2324 | def __init__(self): |
nothing calls this directly
no test coverage detected