diff options
| author | LostDragonist <lost.dragonist@gmail.com> | 2018-11-26 07:44:26 -0600 |
|---|---|---|
| committer | LostDragonist <lost.dragonist@gmail.com> | 2018-11-26 07:44:26 -0600 |
| commit | 4cae1397e7e54a2b4f5593d6ad74c969471c3055 (patch) | |
| tree | 7c0073526d42ad0509728f982d106f4d14b86e5a /src/modlist.cpp | |
| parent | 7fbfc121182c4893a317f55b78021e58e29a7605 (diff) | |
Prevent the user from setting a negative mod priority
Diffstat (limited to 'src/modlist.cpp')
| -rw-r--r-- | src/modlist.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/modlist.cpp b/src/modlist.cpp index 539ba6fc..6c04738a 100644 --- a/src/modlist.cpp +++ b/src/modlist.cpp @@ -526,6 +526,9 @@ bool ModList::setData(const QModelIndex &index, const QVariant &value, int role) case COL_PRIORITY: {
bool ok = false;
int newPriority = value.toInt(&ok);
+ if (ok && newPriority < 0) {
+ newPriority = 0;
+ }
if (ok) {
m_Profile->setModPriority(modID, newPriority);
|
