diff options
author | Miguel Costa <miguel.costa@qt.io> | 2019-09-24 15:16:29 +0200 |
---|---|---|
committer | Miguel Costa <miguel.costa@qt.io> | 2019-09-30 10:30:32 +0000 |
commit | 01556f00258a228c15ed67a8cc237b7250beb877 (patch) | |
tree | 80796e81363243d66bbfe0acf24e39c4f01de1ce | |
parent | aace5b9acbb4798f91019a2c0738f8099ed3de30 (diff) |
Fix modules dialog not shown if property is empty
Fixed a bug in the Qt settings property page where the modules
selection dialog would not be shown if the corresponding field was
empty.
Change-Id: I678cda4d9af408f6701c68f6dbe27c2407408061
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
-rw-r--r-- | src/qtvstools/QtMsBuild/Components/QtModulesEditor.cs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/qtvstools/QtMsBuild/Components/QtModulesEditor.cs b/src/qtvstools/QtMsBuild/Components/QtModulesEditor.cs index d7670d49..e895006d 100644 --- a/src/qtvstools/QtMsBuild/Components/QtModulesEditor.cs +++ b/src/qtvstools/QtMsBuild/Components/QtModulesEditor.cs @@ -72,9 +72,12 @@ namespace QtVsTools.QtMsBuild }); } - var currentModuleVars = currentValue.ToString().Split(';'); - var currentModules = modules.Values - .Where(x => x.Vars.All(y => currentModuleVars.Contains(y))); + var currentModules = Enumerable.Empty<Module>(); + if (currentValue != null) { + var currentModuleVars = currentValue.ToString().Split(';'); + currentModules = modules.Values + .Where(x => x.Vars.All(y => currentModuleVars.Contains(y))); + } await Vsix.Instance.JoinableTaskFactory.SwitchToMainThreadAsync(); |