From b27ed3dc412d85349e8beb97efdd8224f01b5eab Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Tue, 17 Dec 2024 22:58:40 +0100 Subject: [PATCH] PE: Wizard - Do no open project file when selecting `JsonSummaryPage::updateProjectData` is called when the user selects the desired target project to add new files. When selecting `` the desired project was not serialized in the Wizard, and the initial project value was used. Fixes: QTCREATORBUG-32184 Change-Id: I3972dc579db5c31464e5ddb4f4316907e7e9bd5f Reviewed-by: Christian Kandeler Reviewed-by: Eike Ziller --- src/plugins/projectexplorer/jsonwizard/jsonsummarypage.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/projectexplorer/jsonwizard/jsonsummarypage.cpp b/src/plugins/projectexplorer/jsonwizard/jsonsummarypage.cpp index a945b20d51c..ac99455adb3 100644 --- a/src/plugins/projectexplorer/jsonwizard/jsonsummarypage.cpp +++ b/src/plugins/projectexplorer/jsonwizard/jsonsummarypage.cpp @@ -279,7 +279,9 @@ void JsonSummaryPage::updateProjectData(FolderNode *node) m_wizard->setValue(QLatin1String(KEY_SELECTED_PROJECT), QVariant::fromValue(project)); m_wizard->setValue(QLatin1String(KEY_SELECTED_NODE), QVariant::fromValue(node)); - m_wizard->setValue(QLatin1String(Constants::PROJECT_ISSUBPROJECT), node ? true : false); + m_wizard->setValue(Constants::PROJECT_ISSUBPROJECT, node ? true : false); + m_wizard->setValue(Constants::PREFERRED_PROJECT_NODE, QVariant::fromValue(node)); + m_wizard->setValue(Constants::PREFERRED_PROJECT_NODE_PATH, node ? node->filePath().toString() : QString()); bool qtKeyWordsEnabled = true; if (ProjectTree::hasNode(node)) { const ProjectNode *projectNode = node->asProjectNode();