Skip to content

Commit

Permalink
Merge pull request #1921 from ModOrganizer2/rc_fixes
Browse files Browse the repository at this point in the history
A few fixes for RC 1
  • Loading branch information
Silarn committed Nov 17, 2023
2 parents 1b4ed39 + 773e3ac commit 828c9c8
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 828c9c8

Please sign in to comment.