From 2c9a3c7de874a5edfdc6dacf2fd2fcd7f303152d Mon Sep 17 00:00:00 2001 From: Mikaƫl Capelle Date: Thu, 14 Jan 2021 19:54:13 +0100 Subject: Better context menu entries for mod/separator creation. --- src/modlistviewactions.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/modlistviewactions.cpp') diff --git a/src/modlistviewactions.cpp b/src/modlistviewactions.cpp index ed26faa8..c83f2f64 100644 --- a/src/modlistviewactions.cpp +++ b/src/modlistviewactions.cpp @@ -172,6 +172,11 @@ void ModListViewActions::createSeparator(const QModelIndex& index) const int newPriority = -1; if (index.isValid() && m_view->sortColumn() == ModList::COL_PRIORITY) { newPriority = m_core.currentProfile()->getModPriority(index.data(ModList::IndexRole).toInt()); + + // descending order, we need to fix the priority + if (m_view->sortOrder() == Qt::DescendingOrder) { + newPriority++; + } } if (m_core.createMod(name) == nullptr) { -- cgit v1.3.1