diff --git a/src/AutoSplit.py b/src/AutoSplit.py index c5be879d..58c5cfd9 100644 --- a/src/AutoSplit.py +++ b/src/AutoSplit.py @@ -270,17 +270,7 @@ def __load_start_image(self, started_by_button: bool = False, wait_for_delay: bo QApplication.processEvents() return - if self.start_image: - if not self.is_auto_controlled \ - and ( - not self.settings_dict["split_hotkey"] - or not self.settings_dict["reset_hotkey"] - or not self.settings_dict["pause_hotkey"] - ): - error_messages.load_start_image() - QApplication.processEvents() - return - else: + if not self.start_image: if started_by_button: error_messages.no_keyword_image(START_KEYWORD) QApplication.processEvents() @@ -518,7 +508,9 @@ def __auto_splitter(self): # noqa: PLR0912,PLR0915 self.run_start_time = time() if not (validate_before_parsing(self) and parse_and_validate_images(self)): - self.gui_changes_on_reset(True) + # `safe_to_reload_start_image: bool = False` becasue __load_start_image also does this check, + # we don't want to double a start/reset image error message + self.gui_changes_on_reset(False) return # Construct a list of images + loop count tuples. diff --git a/src/error_messages.py b/src/error_messages.py index 63462140..15f3b66b 100644 --- a/src/error_messages.py +++ b/src/error_messages.py @@ -133,8 +133,8 @@ def check_for_updates(): def load_start_image(): set_text_message( - "Start Image found, but cannot be loaded unless Start, Reset, and Pause hotkeys are set. " - + "Please set these hotkeys, and then click the Reload Start Image button.", + "Start Image found, but cannot be loaded unless Start hotkey is set. " + + "Please set the hotkey, and then click the Reload Start Image button.", ) diff --git a/src/split_parser.py b/src/split_parser.py index 250c866d..468ca0d3 100644 --- a/src/split_parser.py +++ b/src/split_parser.py @@ -186,6 +186,26 @@ def parse_and_validate_images(autosplit: AutoSplit): autosplit.reset_image = __pop_image_type(all_images, ImageType.RESET) autosplit.split_images = all_images + # If there is no start hotkey set but a start image is present, and is not auto controlled, throw an error. + if ( + autosplit.start_image + and not autosplit.settings_dict["split_hotkey"] + and not autosplit.is_auto_controlled + ): + autosplit.gui_changes_on_reset() + error_messages.load_start_image() + return False + + # If there is no reset hotkey set but a reset image is present, and is not auto controlled, throw an error. + if ( + autosplit.reset_image + and not autosplit.settings_dict["reset_hotkey"] + and not autosplit.is_auto_controlled + ): + autosplit.gui_changes_on_reset() + error_messages.reset_hotkey() + return False + # Make sure that each of the images follows the guidelines for correct format # according to all of the settings selected by the user. for image in autosplit.split_images: @@ -206,11 +226,6 @@ def parse_and_validate_images(autosplit: AutoSplit): # Check that there's only one reset image if image.image_type == ImageType.RESET: - # If there is no reset hotkey set but a reset image is present, and is not auto controlled, throw an error. - if not autosplit.settings_dict["reset_hotkey"] and not autosplit.is_auto_controlled: - autosplit.gui_changes_on_reset() - error_messages.reset_hotkey() - return False autosplit.gui_changes_on_reset() error_messages.multiple_keyword_images(RESET_KEYWORD) return False