summaryrefslogtreecommitdiff
path: root/src/modlist.cpp
diff options
context:
space:
mode:
authorTannin <devnull@localhost>2015-05-12 18:56:44 +0200
committerTannin <devnull@localhost>2015-05-12 18:56:44 +0200
commit90365041f463f6c062b154e94fedbf75f96fb880 (patch)
tree5f8161811b3245ae85238945c7ab28cea242360c /src/modlist.cpp
parent183b5715609b309431d8040101635ef9ac0843bf (diff)
workaround to prevent repeated checking of mods with the mouse was interpreted
as double click
Diffstat (limited to 'src/modlist.cpp')
-rw-r--r--src/modlist.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/modlist.cpp b/src/modlist.cpp
index 8c1d56b7..e05935ef 100644
--- a/src/modlist.cpp
+++ b/src/modlist.cpp
@@ -454,6 +454,7 @@ bool ModList::setData(const QModelIndex &index, const QVariant &value, int role)
if (m_Profile->modEnabled(modID) != enabled) {
m_Profile->setModEnabled(modID, enabled);
m_Modified = true;
+ m_LastCheck.restart();
emit modlist_changed(index, role);
}
result = true;
@@ -665,6 +666,11 @@ void ModList::disconnectSlots() {
m_ModStateChanged.disconnect_all_slots();
}
+int ModList::timeElapsedSinceLastChecked() const
+{
+ return m_LastCheck.elapsed();
+}
+
IModList::ModStates ModList::state(unsigned int modIndex) const
{
IModList::ModStates result;