diff --git a/launcher/InstanceList.cpp b/launcher/InstanceList.cpp index 15e3eac44..ddeebb7d7 100644 --- a/launcher/InstanceList.cpp +++ b/launcher/InstanceList.cpp @@ -331,11 +331,6 @@ void InstanceList::deleteGroup(const QString& name) } } -bool InstanceList::isGroupCollapsed(const QString& group) -{ - return m_collapsedGroups.contains(group); -} - bool InstanceList::trashInstance(const InstanceId& id) { auto inst = getInstanceById(id); @@ -685,7 +680,7 @@ void InstanceList::saveGroupList() auto name = iter.key(); QJsonObject groupObj; QJsonArray instanceArr; - groupObj.insert("hidden", QJsonValue(m_collapsedGroups.contains(name))); + groupObj.insert("hidden", false); // preserve compatiblity with older versions for (auto item : list) { instanceArr.append(QJsonValue(item)); } @@ -774,11 +769,6 @@ void InstanceList::loadGroupList() // keep a list/set of groups for choosing groupSet.insert(groupName); - auto hidden = groupObj.value("hidden").toBool(false); - if (hidden) { - m_collapsedGroups.insert(groupName); - } - // Iterate through the list of instances in the group. QJsonArray instancesArray = groupObj.value("instances").toArray(); @@ -810,17 +800,6 @@ void InstanceList::on_InstFolderChanged(const Setting& setting, QVariant value) } } -void InstanceList::on_GroupStateChanged(const QString& group, bool collapsed) -{ - qDebug() << "Group" << group << (collapsed ? "collapsed" : "expanded"); - if (collapsed) { - m_collapsedGroups.insert(group); - } else { - m_collapsedGroups.remove(group); - } - saveGroupList(); -} - class InstanceStaging : public Task { Q_OBJECT const unsigned minBackoff = 1; diff --git a/launcher/InstanceList.h b/launcher/InstanceList.h index c946a063c..ba36f8ee9 100644 --- a/launcher/InstanceList.h +++ b/launcher/InstanceList.h @@ -80,7 +80,6 @@ class InstanceList : public QAbstractTableModel { InstancePtr getInstanceByManagedName(const QString& managed_name) const; QModelIndex getInstanceIndexById(const QString& id) const; QStringList getGroups(); - bool isGroupCollapsed(const QString& groupName); GroupId getInstanceGroup(const InstanceId& id) const; void setInstanceGroup(const InstanceId& id, const GroupId& name); @@ -134,7 +133,6 @@ class InstanceList : public QAbstractTableModel { public slots: void on_InstFolderChanged(const Setting& setting, QVariant value); - void on_GroupStateChanged(const QString& group, bool collapsed); private slots: void propertiesChanged(BaseInstance* inst); @@ -162,8 +160,6 @@ class InstanceList : public QAbstractTableModel { SettingsObjectPtr m_globalSettings; QString m_instDir; QFileSystemWatcher* m_watcher; - // FIXME: this is so inefficient that looking at it is almost painful. - QSet m_collapsedGroups; QMap m_instanceGroupIndex; QSet instanceSet; bool m_groupsLoaded = false;