summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
Diffstat (limited to 'application')
-rw-r--r--application/MainWindow.cpp7
-rw-r--r--application/dialogs/CopyInstanceDialog.cpp2
-rw-r--r--application/pages/instance/LegacyUpgradePage.cpp2
3 files changed, 7 insertions, 4 deletions
diff --git a/application/MainWindow.cpp b/application/MainWindow.cpp
index 9a1efb2b..883b38f9 100644
--- a/application/MainWindow.cpp
+++ b/application/MainWindow.cpp
@@ -1446,7 +1446,8 @@ void MainWindow::on_actionChangeInstGroup_triggered()
return;
bool ok = false;
- QString name(m_selectedInstance->group());
+ InstanceId instId = m_selectedInstance->id();
+ QString name(MMC->instances()->getInstanceGroup(instId));
auto groups = MMC->instances()->getGroups();
groups.insert(0, "");
groups.sort(Qt::CaseInsensitive);
@@ -1455,7 +1456,9 @@ void MainWindow::on_actionChangeInstGroup_triggered()
name = QInputDialog::getItem(this, tr("Group name"), tr("Enter a new group name."), groups, foo, true, &ok);
name = name.simplified();
if (ok)
- m_selectedInstance->setGroupPost(name);
+ {
+ MMC->instances()->setInstanceGroup(instId, name);
+ }
}
void MainWindow::deleteGroup()
diff --git a/application/dialogs/CopyInstanceDialog.cpp b/application/dialogs/CopyInstanceDialog.cpp
index b16684c6..78f7512e 100644
--- a/application/dialogs/CopyInstanceDialog.cpp
+++ b/application/dialogs/CopyInstanceDialog.cpp
@@ -45,7 +45,7 @@ CopyInstanceDialog::CopyInstanceDialog(InstancePtr original, QWidget *parent)
groupList.removeOne("");
groupList.push_front("");
ui->groupBox->addItems(groupList);
- int index = groupList.indexOf(m_original->group());
+ int index = groupList.indexOf(MMC->instances()->getInstanceGroup(m_original->id()));
if(index == -1)
{
index = 0;
diff --git a/application/pages/instance/LegacyUpgradePage.cpp b/application/pages/instance/LegacyUpgradePage.cpp
index 0d2e5996..15fd10cc 100644
--- a/application/pages/instance/LegacyUpgradePage.cpp
+++ b/application/pages/instance/LegacyUpgradePage.cpp
@@ -38,7 +38,7 @@ void LegacyUpgradePage::on_upgradeButton_clicked()
QString newName = tr("%1 (Migrated)").arg(m_inst->name());
auto upgradeTask = new LegacyUpgradeTask(m_inst);
upgradeTask->setName(newName);
- upgradeTask->setGroup(m_inst->group());
+ upgradeTask->setGroup(MMC->instances()->getInstanceGroup(m_inst->id()));
upgradeTask->setIcon(m_inst->iconKey());
std::unique_ptr<Task> task(MMC->instances()->wrapInstanceTask(upgradeTask));
runModalTask(task.get());