From a22a16fe0066692c1f0c1f88bd4d096212654f7b Mon Sep 17 00:00:00 2001 From: Miguel Costa Date: Mon, 14 Oct 2019 12:53:22 +0200 Subject: Fix menu option showing empty settings dialog Fixed a problem where selecting the "Qt VS Tools" > "Qt Project Settings" main menu option would open a settings dialog with all fields cleared. This would happen with a project with the latest (V3) format. In this case, selecting the menu option will now open the VS project property page dialog. Task-number: QTVSADDINBUG-682 Change-Id: I039e9abdfe1b56a4ca1534b9e4e7d40a3fd92c39 Reviewed-by: Oliver Wolff --- src/qtvstools/QtMainMenu.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/qtvstools/QtMainMenu.cs b/src/qtvstools/QtMainMenu.cs index 4b23c1b2..8abb9141 100644 --- a/src/qtvstools/QtMainMenu.cs +++ b/src/qtvstools/QtMainMenu.cs @@ -171,7 +171,10 @@ namespace QtVsTools case CommandId.QtProjectSettingsId: { var pro = HelperFunctions.GetSelectedQtProject(Vsix.Instance.Dte); - if (pro != null) { + int projectVersion = QtProject.GetFormatVersion(pro); + if (projectVersion >= Resources.qtMinFormatVersion_Settings) { + Vsix.Instance.Dte.ExecuteCommand("Project.Properties"); + } else if (pro != null) { using (var formProjectQtSettings = new FormProjectQtSettings()) { formProjectQtSettings.SetProject(pro); formProjectQtSettings.StartPosition = FormStartPosition.CenterParent; -- cgit v1.2.3