diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-10-09 00:24:14 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-10-09 00:24:14 +0200 |
commit | 36edf6cbc6f0b329e0b8f96dc5543cff0acb8aec (patch) | |
tree | ad127020649817ef6203fbea22d3eff954b5b110 /gui/LegacyModEditDialog.cpp | |
parent | 05e2da51d8d25374140dce3c1646a2a1a0a2a553 (diff) | |
parent | 9edc486f137c9719bd62c8c63ecc3d195f9dc79e (diff) | |
download | MultiMC-36edf6cbc6f0b329e0b8f96dc5543cff0acb8aec.tar MultiMC-36edf6cbc6f0b329e0b8f96dc5543cff0acb8aec.tar.gz MultiMC-36edf6cbc6f0b329e0b8f96dc5543cff0acb8aec.tar.lz MultiMC-36edf6cbc6f0b329e0b8f96dc5543cff0acb8aec.tar.xz MultiMC-36edf6cbc6f0b329e0b8f96dc5543cff0acb8aec.zip |
Merge branch 'feature_mcmod_info' into develop
Diffstat (limited to 'gui/LegacyModEditDialog.cpp')
-rw-r--r-- | gui/LegacyModEditDialog.cpp | 27 |
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); } |