Make requested changes
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
parent
36ceaebcf0
commit
221365f05b
2 changed files with 6 additions and 8 deletions
|
@ -47,7 +47,8 @@
|
||||||
|
|
||||||
#include "minecraft/mod/tasks/LocalDataPackParseTask.h"
|
#include "minecraft/mod/tasks/LocalDataPackParseTask.h"
|
||||||
|
|
||||||
DataPackFolderModel::DataPackFolderModel(const QString& dir, BaseInstance* instance, bool is_indexed, bool create_dir, QObject* parent) : ResourceFolderModel(QDir(dir), instance, is_indexed, create_dir, parent)
|
DataPackFolderModel::DataPackFolderModel(const QString& dir, BaseInstance* instance, bool is_indexed, bool create_dir, QObject* parent)
|
||||||
|
: ResourceFolderModel(QDir(dir), instance, is_indexed, create_dir, parent)
|
||||||
{
|
{
|
||||||
m_column_names = QStringList({ "Enable", "Image", "Name", "Pack Format", "Last Modified" });
|
m_column_names = QStringList({ "Enable", "Image", "Name", "Pack Format", "Last Modified" });
|
||||||
m_column_names_translated = QStringList({ tr("Enable"), tr("Image"), tr("Name"), tr("Pack Format"), tr("Last Modified") });
|
m_column_names_translated = QStringList({ tr("Enable"), tr("Image"), tr("Name"), tr("Pack Format"), tr("Last Modified") });
|
||||||
|
@ -123,12 +124,10 @@ QVariant DataPackFolderModel::data(const QModelIndex& index, int role) const
|
||||||
}
|
}
|
||||||
return {};
|
return {};
|
||||||
case Qt::CheckStateRole:
|
case Qt::CheckStateRole:
|
||||||
switch (column) {
|
if (column == ActiveColumn)
|
||||||
case ActiveColumn:
|
return at(row).enabled() ? Qt::Checked : Qt::Unchecked;
|
||||||
return at(row).enabled() ? Qt::Checked : Qt::Unchecked;
|
else
|
||||||
default:
|
return {};
|
||||||
return {};
|
|
||||||
}
|
|
||||||
default:
|
default:
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QDialog>
|
|
||||||
#include <QMainWindow>
|
#include <QMainWindow>
|
||||||
#include <QSortFilterProxyModel>
|
#include <QSortFilterProxyModel>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue