feat: modify InfoFrame and ResourcePackPage to show ResourcePack info

Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
flow
2022-08-28 22:31:48 -03:00
parent 050768c266
commit afa1a5e932
3 changed files with 101 additions and 15 deletions

View File

@ -61,4 +61,15 @@ public:
return !m_instance->traits().contains("no-texturepacks") &&
!m_instance->traits().contains("texturepacks");
}
public slots:
bool onSelectionChanged(const QModelIndex& current, const QModelIndex& previous) override
{
auto sourceCurrent = m_filterModel->mapToSource(current);
int row = sourceCurrent.row();
auto& rp = static_cast<ResourcePack&>(m_model->at(row));
ui->frame->updateWithResourcePack(rp);
return true;
}
};