Skip to content

Commit

Permalink
Merge pull request #59 from Wolfmyths/future-update
Browse files Browse the repository at this point in the history
1.5.3
  • Loading branch information
Wolfmyths authored Jul 14, 2024
2 parents e707459 + 34b3c3a commit 3321e84
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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
pyinstaller==6.9.0
pytest==8.2.2
pytest-qt==4.4.0
2 changes: 1 addition & 1 deletion src/constant_vars.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
11 changes: 4 additions & 7 deletions src/profiles.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from __future__ import annotations
from typing import TYPE_CHECKING

import PySide6.QtWidgets as qtw
import PySide6.QtGui as qtg
Expand All @@ -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__()
Expand All @@ -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__) == "<class 'widgets.managerQTableWidget.ModListWidget'>":
if isinstance(widget, ModListWidget):
widget.refreshMods()
break

Expand Down

0 comments on commit 3321e84

Please sign in to comment.