Refactor into InstanceDirUpdate.h

Signed-off-by: Yihe Li <winmikedows@hotmail.com>
This commit is contained in:
Yihe Li
2025-03-27 05:47:29 +08:00
parent b550a6c5c4
commit 7b511f4c67
6 changed files with 146 additions and 60 deletions

View File

@ -124,6 +124,7 @@
#include "KonamiCode.h"
#include "InstanceCopyTask.h"
#include "InstanceDirUpdate.h"
#include "Json.h"
@ -1704,7 +1705,7 @@ void MainWindow::instanceDataChanged(const QModelIndex& topLeft, const QModelInd
QItemSelection test(topLeft, bottomRight);
if (test.contains(current)) {
instanceChanged(current, current);
if (m_selectedInstance && m_selectedInstance->updateInstanceRoot(this)) {
if (m_selectedInstance && askToUpdateInstanceDirName(APPLICATION->settings(), m_selectedInstance, this)) {
auto newID = m_selectedInstance->name();
refreshInstances();
setSelectedInstanceById(newID);