fix: removing mods with their metadata as well

Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
flow 2022-09-03 13:27:27 -03:00
parent 9db27c6acc
commit 43a7af3f44
No known key found for this signature in database
GPG Key ID: 8D0F221F0A59F469
2 changed files with 12 additions and 0 deletions

View File

@ -135,6 +135,16 @@ bool ModFolderPage::onSelectionChanged(const QModelIndex& current, const QModelI
return true;
}
void ModFolderPage::removeItem()
{
if (!m_controlsEnabled)
return;
auto selection = m_filterModel->mapSelectionToSource(ui->treeView->selectionModel()->selection());
m_model->deleteMods(selection.indexes());
}
void ModFolderPage::installMods()
{
if (!m_controlsEnabled)

View File

@ -59,6 +59,8 @@ class ModFolderPage : public ExternalResourcesPage {
bool onSelectionChanged(const QModelIndex& current, const QModelIndex& previous) override;
private slots:
void removeItem() override;
void installMods();
void updateMods();