summaryrefslogtreecommitdiffstats
path: root/application/pages/ModFolderPage.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-05-11 22:50:35 +0200
committerPetr Mrázek <peterix@gmail.com>2015-05-11 22:50:35 +0200
commit88f975eff7e44341c7fc35767ff954c7cb27ca9e (patch)
tree558c9a96b32ab7157344f99b462c000d3f336eca /application/pages/ModFolderPage.cpp
parent11c376f6f132058bb4427f1a0deb9650c7746529 (diff)
downloadMultiMC-88f975eff7e44341c7fc35767ff954c7cb27ca9e.tar
MultiMC-88f975eff7e44341c7fc35767ff954c7cb27ca9e.tar.gz
MultiMC-88f975eff7e44341c7fc35767ff954c7cb27ca9e.tar.lz
MultiMC-88f975eff7e44341c7fc35767ff954c7cb27ca9e.tar.xz
MultiMC-88f975eff7e44341c7fc35767ff954c7cb27ca9e.zip
NOISSUE only watch mod folders when the user is looking at them
Diffstat (limited to 'application/pages/ModFolderPage.cpp')
-rw-r--r--application/pages/ModFolderPage.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/application/pages/ModFolderPage.cpp b/application/pages/ModFolderPage.cpp
index f070098f..16272653 100644
--- a/application/pages/ModFolderPage.cpp
+++ b/application/pages/ModFolderPage.cpp
@@ -47,12 +47,21 @@ ModFolderPage::ModFolderPage(BaseInstance *inst, std::shared_ptr<ModList> mods,
m_helpName = helpPage;
ui->modTreeView->setModel(m_mods.get());
ui->modTreeView->installEventFilter(this);
- m_mods->startWatching();
auto smodel = ui->modTreeView->selectionModel();
connect(smodel, SIGNAL(currentChanged(QModelIndex, QModelIndex)),
SLOT(modCurrent(QModelIndex, QModelIndex)));
}
+void ModFolderPage::opened()
+{
+ m_mods->startWatching();
+}
+
+void ModFolderPage::closed()
+{
+ m_mods->stopWatching();
+}
+
CoreModFolderPage::CoreModFolderPage(BaseInstance *inst, std::shared_ptr<ModList> mods,
QString id, QString iconName, QString displayName,
QString helpPage, QWidget *parent)