diff options
author | TheKodeToad <TheKodeToad@proton.me> | 2023-06-24 23:34:37 +0100 |
---|---|---|
committer | TheKodeToad <TheKodeToad@proton.me> | 2023-06-24 23:36:32 +0100 |
commit | 5eb71fc6a96690e3d9a658f383b0937446ec3f9e (patch) | |
tree | be3dbd18b21635997eb41dd7c7290074beaadf94 | |
parent | 8a3aba1634ca9f8b86c995687c7e2f99740d9111 (diff) | |
download | PrismLauncher-5eb71fc6a96690e3d9a658f383b0937446ec3f9e.tar.gz PrismLauncher-5eb71fc6a96690e3d9a658f383b0937446ec3f9e.tar.bz2 PrismLauncher-5eb71fc6a96690e3d9a658f383b0937446ec3f9e.zip |
Revert "feat(Mods): hide 'Provider' column when no mods have providers"
With Ryex's change, this causes issues. Apparently you need to sign off reverts! That's just weird...
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
-rw-r--r-- | launcher/ui/widgets/ModListView.cpp | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/launcher/ui/widgets/ModListView.cpp b/launcher/ui/widgets/ModListView.cpp index 893cd120..80a918b6 100644 --- a/launcher/ui/widgets/ModListView.cpp +++ b/launcher/ui/widgets/ModListView.cpp @@ -14,9 +14,6 @@ */ #include "ModListView.h" - -#include "minecraft/mod/ModFolderModel.h" - #include <QHeaderView> #include <QMouseEvent> #include <QPainter> @@ -65,19 +62,6 @@ void ModListView::setModel ( QAbstractItemModel* model ) for(int i = 1; i < head->count(); i++) head->setSectionResizeMode(i, QHeaderView::ResizeToContents); } - - auto real_model = model; - if (auto proxy_model = dynamic_cast<QSortFilterProxyModel*>(model); proxy_model) - real_model = proxy_model->sourceModel(); - - if (auto mod_model = dynamic_cast<ModFolderModel*>(real_model); mod_model) { - connect(mod_model, &ModFolderModel::updateFinished, this, [this, mod_model]{ - auto mods = mod_model->allMods(); - // Hide the 'Provider' column if no mod has a defined provider! - setColumnHidden(ModFolderModel::Columns::ProviderColumn, - std::none_of(mods.constBegin(), mods.constEnd(), [](auto const mod){ return mod->provider().has_value(); })); - }); - } } void ModListView::setResizeModes(const QList<QHeaderView::ResizeMode> &modes) |