summaryrefslogtreecommitdiffstats
path: root/gui/LegacyModEditDialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/LegacyModEditDialog.cpp')
-rw-r--r--gui/LegacyModEditDialog.cpp27
1 files changed, 17 insertions, 10 deletions
diff --git a/gui/LegacyModEditDialog.cpp b/gui/LegacyModEditDialog.cpp
index 87647e0f..585bfdfb 100644
--- a/gui/LegacyModEditDialog.cpp
+++ b/gui/LegacyModEditDialog.cpp
@@ -345,34 +345,41 @@ void LegacyModEditDialog::on_buttonBox_rejected()
close();
}
-//FIXME: too much copypasta makes peterix a sad hacker. BUT IT'S SO DELICIOUS!
-
-void LegacyModEditDialog::on_coreWebsite_clicked()
+void LegacyModEditDialog::on_jarModsTreeView_pressed(const QModelIndex &index)
{
int first, last;
- auto list = ui->coreModsTreeView->selectionModel()->selectedRows();
+ auto list = ui->jarModsTreeView->selectionModel()->selectedRows();
if (!lastfirst(list, first, last))
return;
- showWebsiteForMod(this, m_coremods->operator[](first));
+
+ Mod &m = m_jarmods->operator[](first);
+
+ handleModInfoUpdate(m, ui->jarMIFrame);
}
-void LegacyModEditDialog::on_jarWebsite_clicked()
+void LegacyModEditDialog::on_coreModsTreeView_pressed(const QModelIndex &index)
{
int first, last;
- auto list = ui->jarModsTreeView->selectionModel()->selectedRows();
+ auto list = ui->coreModsTreeView->selectionModel()->selectedRows();
if (!lastfirst(list, first, last))
return;
- showWebsiteForMod(this, m_jarmods->operator[](first));
+
+ Mod &m = m_coremods->operator[](first);
+
+ handleModInfoUpdate(m, ui->coreMIFrame);
}
-void LegacyModEditDialog::on_loaderWebsite_clicked()
+void LegacyModEditDialog::on_loaderModTreeView_pressed(const QModelIndex &index)
{
int first, last;
auto list = ui->loaderModTreeView->selectionModel()->selectedRows();
if (!lastfirst(list, first, last))
return;
- showWebsiteForMod(this, m_mods->operator[](first));
+
+ Mod &m = m_mods->operator[](first);
+
+ handleModInfoUpdate(m, ui->loaderMIFrame);
}