diff options
| author | Silarn <jrim@rimpo.org> | 2018-05-04 19:00:55 -0500 |
|---|---|---|
| committer | Silarn <jrim@rimpo.org> | 2018-05-04 19:00:55 -0500 |
| commit | 9ae442810b479dd61747fea03eceae500a6c2411 (patch) | |
| tree | 1083d8f68c261f21647c3980332e31db9f36b7df /src | |
| parent | 9998727dbac0eb77b597cb299576d9ca7561b7cf (diff) | |
Make sure to update the index when data is changed
Diffstat (limited to 'src')
| -rw-r--r-- | src/pluginlist.cpp | 6 | ||||
| -rw-r--r-- | src/pluginlist.h | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/pluginlist.cpp b/src/pluginlist.cpp index fe654c7e..a6ae8fa7 100644 --- a/src/pluginlist.cpp +++ b/src/pluginlist.cpp @@ -76,6 +76,7 @@ PluginList::PluginList(QObject *parent) : QAbstractItemModel(parent)
, m_FontMetrics(QFont())
{
+ connect(this, SIGNAL(writePluginsList()), this, SLOT(generatePluginIndexes()));
}
PluginList::~PluginList()
@@ -738,6 +739,11 @@ void PluginList::updateIndices() m_ESPsByPriority.at(static_cast<size_t>(m_ESPs[i].m_Priority)) = i;
}
+ generatePluginIndexes();
+}
+
+void PluginList::generatePluginIndexes()
+{
int numESLs = 0;
int numSkipped = 0;
for (int l = 0; l < m_ESPs.size(); ++l) {
diff --git a/src/pluginlist.h b/src/pluginlist.h index b3b0ee13..f6745aa8 100644 --- a/src/pluginlist.h +++ b/src/pluginlist.h @@ -257,6 +257,11 @@ public slots: */
void managedGameChanged(MOBase::IPluginGame const *gamePlugin);
+ /**
+ * @brief Generate the plugin indexes because something was changed
+ **/
+ void generatePluginIndexes();
+
signals:
/**
|
