From 8d9a62a87dafd87381829b00b85753db510eef2b Mon Sep 17 00:00:00 2001 From: isanae <14251494+isanae@users.noreply.github.com> Date: Mon, 9 Dec 2019 13:08:58 -0500 Subject: moved the conflicts column back to its proper position in the enum removed unnecessary compat code --- src/mainwindow.cpp | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 44011e5f..b5900c6c 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -178,7 +178,6 @@ along with Mod Organizer. If not, see . #include #include #include -#include #ifdef TEST_MODELS #include "modeltest.h" @@ -528,8 +527,6 @@ void MainWindow::setupModList() ui->modList->header()->resizeSection(column, sectionSize); } } else { - fixConflictsColumn(); - // hide these columns by default ui->modList->header()->setSectionHidden(ModList::COL_CONTENT, true); ui->modList->header()->setSectionHidden(ModList::COL_MODID, true); @@ -551,25 +548,6 @@ void MainWindow::setupModList() ui->modList->installEventFilter(m_OrganizerCore.modList()); } -void MainWindow::fixConflictsColumn() -{ - // the conflicts column should sit to the left of the flags column, but its - // enum is at the end to preserve compatibility - // - // this is called when updating from 2.2.1, or when there is no state saved - // for the mod list, so it's free to do whatever it wants with the column - - const auto flags = ui->modList->header()->visualIndex(ModList::COL_FLAGS); - const auto conflicts = ui->modList->header()->visualIndex(ModList::COL_CONFLICTFLAGS); - - // this can be called twice when migrating from 2.2.1: once in - // processUpdates() and again in setupModList() because the geometry names in - // the ini have changed; to a simple check to see if the column has been moved - if (conflicts > flags) { - ui->modList->header()->moveSection(conflicts, flags); - } -} - void MainWindow::resetActionIcons() { // this is a bit of a hack @@ -2277,10 +2255,6 @@ void MainWindow::processUpdates() { ui->downloadView->header()->hideSection(i); } } - - if (lastVersion < QVersionNumber(2, 2, 2)) { - fixConflictsColumn(); - } } if (currentVersion < lastVersion) { -- cgit v1.3.1