Fix group issues
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
parent
3719ea21b0
commit
5a54d80c6e
@ -290,8 +290,7 @@ void InstanceList::deleteGroup(const GroupId& name)
|
||||
qDebug() << "Remove" << instID << "from group" << name;
|
||||
removed = true;
|
||||
auto idx = getInstIndex(instance.get());
|
||||
if (idx > 0)
|
||||
emit dataChanged(index(idx), index(idx), { GroupRole });
|
||||
emit dataChanged(index(idx), index(idx), { GroupRole });
|
||||
}
|
||||
}
|
||||
if (removed)
|
||||
@ -315,8 +314,7 @@ void InstanceList::renameGroup(const QString& src, const QString& dst)
|
||||
qDebug() << "Set" << instID << "group to" << dst;
|
||||
modified = true;
|
||||
auto idx = getInstIndex(instance.get());
|
||||
if (idx > 0)
|
||||
emit dataChanged(index(idx), index(idx), { GroupRole });
|
||||
emit dataChanged(index(idx), index(idx), { GroupRole });
|
||||
}
|
||||
}
|
||||
if (modified)
|
||||
@ -947,9 +945,12 @@ QString InstanceList::getStagedInstancePath()
|
||||
|
||||
bool InstanceList::commitStagedInstance(const QString& path,
|
||||
InstanceName const& instanceName,
|
||||
const QString& groupName,
|
||||
QString groupName,
|
||||
InstanceTask const& commiting)
|
||||
{
|
||||
if (groupName.isEmpty() && !groupName.isNull())
|
||||
groupName = QString();
|
||||
|
||||
QDir dir;
|
||||
QString instID;
|
||||
InstancePtr inst;
|
||||
|
@ -130,7 +130,7 @@ class InstanceList : public QAbstractListModel {
|
||||
* should_override is used when another similar instance already exists, and we want to override it
|
||||
* - for instance, when updating it.
|
||||
*/
|
||||
bool commitStagedInstance(const QString& keyPath, const InstanceName& instanceName, const QString& groupName, const InstanceTask&);
|
||||
bool commitStagedInstance(const QString& keyPath, const InstanceName& instanceName, QString groupName, const InstanceTask&);
|
||||
|
||||
/**
|
||||
* Destroy a previously created staging area given by @keyPath - used when creation fails.
|
||||
|
Loading…
Reference in New Issue
Block a user