aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarsten Heimrich <karsten.heimrich@qt.io>2024-01-12 12:52:50 +0100
committerKarsten Heimrich <karsten.heimrich@qt.io>2024-01-16 10:31:47 +0000
commitbc5a7afdf1d795bf2d528782f47b61c2e3296ab3 (patch)
treeb7d2b228e84211e97284af21976e71ec666b7818
parent1f3c620a0692bf861ed29f2d591487db0c294ae8 (diff)
Fix button state logic on the wizard config page
* Always store the initial state of the 'Next' and 'Finish' button. * Do not overwrite the initial state of the buttons once we have configured a new Qt version (if there was non before). When starting certain wizards, such as the {Empty, Console, QML} wizard, there is no subsequent page after the configuration page. The logic for the 'Next' and 'Finish' button was broken, especially when no Qt version was configured. Attempting to set up a Qt version using the error message (a label one can click on) resulted in unnecessary overwriting of the initial state of the 'Next' and 'Finish' button in the ErrorMsg_OnMouseDown() function. Change-Id: I2efbe631bcb567997e349418016c0174cbb4a076 Reviewed-by: Miguel Costa <miguel.costa@qt.io> Reviewed-by: Ali Can Demiralp <ali.demiralp@qt.io>
-rw-r--r--QtVsTools.Wizards/ProjectWizard/ConfigPage.xaml.cs12
1 files changed, 5 insertions, 7 deletions
diff --git a/QtVsTools.Wizards/ProjectWizard/ConfigPage.xaml.cs b/QtVsTools.Wizards/ProjectWizard/ConfigPage.xaml.cs
index 2bd7c52d..8ab0f4b5 100644
--- a/QtVsTools.Wizards/ProjectWizard/ConfigPage.xaml.cs
+++ b/QtVsTools.Wizards/ProjectWizard/ConfigPage.xaml.cs
@@ -149,11 +149,12 @@ namespace QtVsTools.Wizards.ProjectWizard
qtVersionList = new[] { QT_VERSION_DEFAULT, QT_VERSION_BROWSE }
.Union(QtVersionManager.The().GetVersions());
- if (defaultQtVersionInfo != null) {
+ if (defaultQtVersionInfo != null)
SetupDefaultConfigsAndConfigTable(defaultQtVersionInfo);
- initialNextButtonIsEnabled = NextButton.IsEnabled;
- initialFinishButtonIsEnabled = FinishButton.IsEnabled;
- }
+
+ initialNextButtonIsEnabled = NextButton.IsEnabled;
+ initialFinishButtonIsEnabled = FinishButton.IsEnabled;
+
Validate();
}
@@ -530,9 +531,6 @@ namespace QtVsTools.Wizards.ProjectWizard
versionInfo.name = qtVersion;
SetupDefaultConfigsAndConfigTable(versionInfo);
- initialNextButtonIsEnabled = true;
- initialFinishButtonIsEnabled = false;
-
Validate();
}
}