diff --git a/requirements.txt b/requirements.txt index 41e6fd5..a47fa70 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,8 @@ PySide6==6.6.1 semantic-version==2.10.0 -patool==1.12.0 +patool==2.3.0 # For external purposes -pyinstaller==6.3.0 -pytest==7.4.4 -pytest-qt==4.3.1 \ No newline at end of file +pyinstaller==6.9.0 +pytest==8.2.2 +pytest-qt==4.4.0 \ No newline at end of file diff --git a/src/constant_vars.py b/src/constant_vars.py index 0b39739..fdf90f2 100644 --- a/src/constant_vars.py +++ b/src/constant_vars.py @@ -97,4 +97,4 @@ class ModRole(): # Program Info PROGRAM_NAME = 'Myth Mod Manager' -VERSION = semantic_version.Version(major=1, minor=5, patch=2) +VERSION = semantic_version.Version(major=1, minor=5, patch=3) diff --git a/src/profiles.py b/src/profiles.py index f9479a3..477f8a6 100644 --- a/src/profiles.py +++ b/src/profiles.py @@ -1,5 +1,4 @@ from __future__ import annotations -from typing import TYPE_CHECKING import PySide6.QtWidgets as qtw import PySide6.QtGui as qtg @@ -9,15 +8,13 @@ from src.widgets.QDialog.announcementQDialog import Notice from src.widgets.progressWidget import ProgressWidget from src.widgets.modProfileQTreeWidget import ProfileList +from src.widgets.managerQTableWidget import ModListWidget from src.threaded.moveToDisabledDir import MoveToDisabledDir from src.threaded.moveToEnabledDir import MoveToEnabledModDir from src.save import Save from src.constant_vars import MOD_CONFIG, PROFILES_JSON -if TYPE_CHECKING: - from src.widgets.managerQTableWidget import ModListWidget - class modProfile(qtw.QWidget): def __init__(self, savePath = MOD_CONFIG, profilePath: str = PROFILES_JSON) -> None: super().__init__() @@ -43,14 +40,14 @@ def applyMods(self, mods: list[str]): enableMods = ProgressWidget(MoveToEnabledModDir(*[x for x in mods if errorChecking.isInstalled(x)])) enableMods.exec() - disableMods = ProgressWidget(MoveToDisabledDir(*[x for x in self.saveManager.sections() if errorChecking.isInstalled(x) and x not in mods])) + disableMods = ProgressWidget(MoveToDisabledDir(*[x for x in self.saveManager.mods() if errorChecking.isInstalled(x) and x not in mods])) disableMods.exec() # Refresh table so it is updated after all of this is done - # TODO: Refactor to make this more flexible, we need a way to find an object within an app-wide scope + # TODO: Refactor to make this not loop through all widgets widget: ModListWidget for widget in qtw.QApplication.allWidgets(): - if str(widget.__class__) == "": + if isinstance(widget, ModListWidget): widget.refreshMods() break