diff options
author | Petr Mrázek <peterix@gmail.com> | 2015-02-01 11:44:47 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2015-04-12 20:57:16 +0200 |
commit | aa70ed2244700dbcc93c1fadb22edc1c1caede37 (patch) | |
tree | 79fc6703e984edc4d631be8c6f40c71400f88aba /gui/MainWindow.cpp | |
parent | 154d19bb74f4c5fc1519aa40cd9dfd20244273a1 (diff) | |
download | MultiMC-aa70ed2244700dbcc93c1fadb22edc1c1caede37.tar MultiMC-aa70ed2244700dbcc93c1fadb22edc1c1caede37.tar.gz MultiMC-aa70ed2244700dbcc93c1fadb22edc1c1caede37.tar.lz MultiMC-aa70ed2244700dbcc93c1fadb22edc1c1caede37.tar.xz MultiMC-aa70ed2244700dbcc93c1fadb22edc1c1caede37.zip |
SCRATCH move icons over to Env, instance proxy model to gui
Diffstat (limited to 'gui/MainWindow.cpp')
-rw-r--r-- | gui/MainWindow.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gui/MainWindow.cpp b/gui/MainWindow.cpp index 8aa2e635..fb3bfd6f 100644 --- a/gui/MainWindow.cpp +++ b/gui/MainWindow.cpp @@ -331,6 +331,7 @@ namespace Ui { #include "gui/groupview/GroupView.h" #include "gui/groupview/InstanceDelegate.h" +#include "gui/InstanceProxyModel.h" #include "gui/Platform.h" @@ -503,7 +504,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi SLOT(instanceChanged(const QModelIndex &, const QModelIndex &))); // track icon changes and update the toolbar! - connect(MMC->icons().get(), SIGNAL(iconUpdated(QString)), SLOT(iconUpdated(QString))); + connect(ENV.icons().get(), SIGNAL(iconUpdated(QString)), SLOT(iconUpdated(QString))); // model reset -> selection is invalid. All the instance pointers are wrong. // FIXME: stop using POINTERS everywhere @@ -1277,7 +1278,7 @@ void MainWindow::on_actionChangeInstIcon_triggered() if (dlg.result() == QDialog::Accepted) { m_selectedInstance->setIconKey(dlg.selectedIconKey); - auto ico = MMC->icons()->getBigIcon(dlg.selectedIconKey); + auto ico = ENV.icons()->getBigIcon(dlg.selectedIconKey); ui->actionChangeInstIcon->setIcon(ico); } } @@ -1286,14 +1287,14 @@ void MainWindow::iconUpdated(QString icon) { if (icon == m_currentInstIcon) { - ui->actionChangeInstIcon->setIcon(MMC->icons()->getBigIcon(m_currentInstIcon)); + ui->actionChangeInstIcon->setIcon(ENV.icons()->getBigIcon(m_currentInstIcon)); } } void MainWindow::updateInstanceToolIcon(QString new_icon) { m_currentInstIcon = new_icon; - ui->actionChangeInstIcon->setIcon(MMC->icons()->getBigIcon(m_currentInstIcon)); + ui->actionChangeInstIcon->setIcon(ENV.icons()->getBigIcon(m_currentInstIcon)); } void MainWindow::setSelectedInstanceById(const QString &id) |