summaryrefslogtreecommitdiffstats
path: root/gui/LegacyModEditDialog.cpp
diff options
context:
space:
mode:
authorSky <git@bunnies.cc>2013-10-08 21:45:48 +0100
committerSky <git@bunnies.cc>2013-10-08 21:45:48 +0100
commitf2291ef161c6ae2d47ede15633626ab1e8caab86 (patch)
tree094f19b0a7cde6cb032778db1466d8e28eb8cf61 /gui/LegacyModEditDialog.cpp
parent60e7e019fe62f48ebdb5cea0ab83ab58f3379fdf (diff)
downloadMultiMC-f2291ef161c6ae2d47ede15633626ab1e8caab86.tar
MultiMC-f2291ef161c6ae2d47ede15633626ab1e8caab86.tar.gz
MultiMC-f2291ef161c6ae2d47ede15633626ab1e8caab86.tar.lz
MultiMC-f2291ef161c6ae2d47ede15633626ab1e8caab86.tar.xz
MultiMC-f2291ef161c6ae2d47ede15633626ab1e8caab86.zip
Move mod info frame and handler to MCModInfoFrame, use on all instances
Diffstat (limited to 'gui/LegacyModEditDialog.cpp')
-rw-r--r--gui/LegacyModEditDialog.cpp39
1 files changed, 39 insertions, 0 deletions
diff --git a/gui/LegacyModEditDialog.cpp b/gui/LegacyModEditDialog.cpp
index 87647e0f..72792581 100644
--- a/gui/LegacyModEditDialog.cpp
+++ b/gui/LegacyModEditDialog.cpp
@@ -376,3 +376,42 @@ void LegacyModEditDialog::on_loaderWebsite_clicked()
return;
showWebsiteForMod(this, m_mods->operator[](first));
}
+
+void LegacyModEditDialog::on_jarModsTreeView_pressed(const QModelIndex &index)
+{
+ int first, last;
+ auto list = ui->jarModsTreeView->selectionModel()->selectedRows();
+
+ if (!lastfirst(list, first, last))
+ return;
+
+ Mod &m = m_jarmods->operator[](first);
+
+ handleModInfoUpdate(m, ui->jarMIFrame);
+}
+
+void LegacyModEditDialog::on_coreModsTreeView_pressed(const QModelIndex &index)
+{
+ int first, last;
+ auto list = ui->coreModsTreeView->selectionModel()->selectedRows();
+
+ if (!lastfirst(list, first, last))
+ return;
+
+ Mod &m = m_coremods->operator[](first);
+
+ handleModInfoUpdate(m, ui->coreMIFrame);
+}
+
+void LegacyModEditDialog::on_loaderModTreeView_pressed(const QModelIndex &index)
+{
+ int first, last;
+ auto list = ui->loaderModTreeView->selectionModel()->selectedRows();
+
+ if (!lastfirst(list, first, last))
+ return;
+
+ Mod &m = m_mods->operator[](first);
+
+ handleModInfoUpdate(m, ui->loaderMIFrame);
+}