Skip to content

Commit

Permalink
A few fixes for RC 1
Browse files Browse the repository at this point in the history
* Convert the priority index to a string as Windows appears to be converting these to localized numerals
* Skip separators when assigning categories
* Update the context menu requirements for displaying the auto-assign option
* Bump to RC 2
  • Loading branch information
Silarn committed Nov 17, 2023
1 parent 1b4ed39 commit 773e3ac
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/modlist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ QVariant ModList::data(const QModelIndex& modelIndex, int role) const
if (modInfo->hasAutomaticPriority()) {
return QVariant(); // hide priority for mods where it's fixed
} else {
return m_Profile->getModPriority(modIndex);
return QString::number(m_Profile->getModPriority(modIndex));
}
} else if (column == COL_MODID) {
int modID = modInfo->nexusId();
Expand Down
4 changes: 3 additions & 1 deletion src/modlistcontextmenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,9 @@ void ModListContextMenu::addRegularActions(ModInfo::Ptr mod)
}
}

if (mod->nexusId() > 0 && !mod->installationFile().isEmpty()) {
if (mod->nexusId() > 0 &&
(mod->getNexusCategory() > 0 || !mod->installationFile().isEmpty()) &&
!mod->isSeparator()) {
addAction(tr("Remap Category (From Nexus)"), [=]() {
m_actions.remapCategory(m_selected);
});
Expand Down
6 changes: 5 additions & 1 deletion src/modlistviewactions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,9 @@ void ModListViewActions::assignCategories() const
}
for (auto mod : m_core.modList()->allMods()) {
ModInfo::Ptr modInfo = ModInfo::getByName(mod);
int nexusCategory = modInfo->getNexusCategory();
if (modInfo->isSeparator())
continue;
int nexusCategory = modInfo->getNexusCategory();
if (!nexusCategory) {
QSettings downloadMeta(m_core.downloadsPath() + "/" +
modInfo->installationFile() + ".meta",
Expand Down Expand Up @@ -1125,6 +1127,8 @@ void ModListViewActions::remapCategory(const QModelIndexList& indices) const
{
for (auto& idx : indices) {
ModInfo::Ptr modInfo = ModInfo::getByIndex(idx.data(ModList::IndexRole).toInt());
if (modInfo->isSeparator())
continue;

int categoryID = modInfo->getNexusCategory();
if (!categoryID) {
Expand Down
2 changes: 1 addition & 1 deletion src/pluginlist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1185,7 +1185,7 @@ QVariant PluginList::displayData(const QModelIndex& modelIndex) const
return m_ESPs[index].name;

case COL_PRIORITY:
return m_ESPs[index].priority;
return QString::number(m_ESPs[index].priority);

case COL_MODINDEX:
return m_ESPs[index].index;
Expand Down
2 changes: 1 addition & 1 deletion src/version.rc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// Otherwise, if letters are used in VER_FILEVERSION_STR, uses the full MOBase::VersionInfo parser
// Otherwise, uses the numbers from VER_FILEVERSION and sets the release type as pre-alpha
#define VER_FILEVERSION 2,5,0
#define VER_FILEVERSION_STR "2.5.0-rc1\0"
#define VER_FILEVERSION_STR "2.5.0rc2\0"

VS_VERSION_INFO VERSIONINFO
FILEVERSION VER_FILEVERSION
Expand Down

0 comments on commit 773e3ac

Please sign in to comment.