diff --git a/gui/components/expand/expandTemplate.py b/gui/components/expand/expandTemplate.py index ba4c029d4..33fc76ef3 100644 --- a/gui/components/expand/expandTemplate.py +++ b/gui/components/expand/expandTemplate.py @@ -46,14 +46,12 @@ def __init__(self, configItems: Union[list[ConfigItem], list[dict]], parent=None currentKey = cfg.key inputComponent = SwitchButton(self) inputComponent.setChecked(self.get(currentKey)) - inputComponent.setChecked(self._get(currentKey)) inputComponent.checkedChanged.connect(partial(self._commit, currentKey, inputComponent, labelComponent)) elif cfg.type == 'combo': currentKey = cfg.key inputComponent = ComboBox(self) inputComponent.addItems(cfg.selection) inputComponent.setCurrentIndex(cfg.selection.index(self.get(currentKey))) - inputComponent.setCurrentIndex(cfg.selection.index(self._get(currentKey))) inputComponent.currentIndexChanged.connect( partial(self._commit, currentKey, inputComponent, labelComponent)) elif cfg.type == 'button': @@ -62,6 +60,7 @@ def __init__(self, configItems: Union[list[ConfigItem], list[dict]], parent=None elif cfg.type == 'text': currentKey = cfg.key inputComponent = LineEdit(self) + inputComponent.setText(self.get(currentKey)) confirmButton = PushButton('确定', self) confirmButton.clicked.connect(partial(self._commit, currentKey, inputComponent, labelComponent)) elif cfg.type == 'label': @@ -94,6 +93,3 @@ def _commit(self, key, target, labelTarget): .parent().parent().parent().parent().parent() ) infoChanged.show() - - def _get(self, key): - return self.get(key) diff --git a/module/clear_special_task_power.py b/module/clear_special_task_power.py index 7a3c8cd53..8e31d9de6 100644 --- a/module/clear_special_task_power.py +++ b/module/clear_special_task_power.py @@ -172,6 +172,7 @@ def commissions_common_operation(self, a, b): to_commissions(self, a) self.swipe(926, 140, 926, 640, duration=1) + time.sleep(1) self.latest_img_array = self.get_screenshot_array() i = 675 line = self.latest_img_array[:, 1076, :] @@ -205,6 +206,7 @@ def commissions_common_operation(self, a, b): to_commissions(self, a) self.swipe(926, 188, 926, 381, duration=1) + time.sleep(1) self.latest_img_array = self.get_screenshot_array() line = self.latest_img_array[:, 1076, :] i = 675 diff --git a/module/rewarded_task.py b/module/rewarded_task.py index 8861007c5..9160e0e7f 100644 --- a/module/rewarded_task.py +++ b/module/rewarded_task.py @@ -138,6 +138,7 @@ def bounty_common_operation(self, a, b): to_bounty(self, a) self.swipe(926, 190, 926, 650, duration=1) + time.sleep(1) self.latest_img_array = self.get_screenshot_array() line = self.latest_img_array[:, 1076, :] los = []