diff options
author | Matt Ward <matt.ward@xamarin.com> | 2017-07-28 17:49:16 +0300 |
---|---|---|
committer | Matt Ward <matt.ward@xamarin.com> | 2017-07-28 17:49:16 +0300 |
commit | 84e557b3b63087a5b936a6ebf74b0a3e16d6966c (patch) | |
tree | 532e12bec3aea0aa347fb6ccdbf659d4a6afb41c /main/src/core | |
parent | 1af8735d73a07bcfb602ac257384c0527981b3ea (diff) |
[Ide] Fix failure to create CocoaApp project from New Project dialog
Fixed bug #58412 - Unable to create CocoaApp from recent templates
https://bugzilla.xamarin.com/show_bug.cgi?id=58412
After creating a CocoaApp (Mac - App - General) that targets
Mavericks if the CocoaApp project template was selected from the
recent projects list in the New Project dialog the project would not
be created if a later Mac OS was selected. In the IDE log an error
would be reported:
No template found matching condition 'Yosemite=false'.
The problem was that the selected project template was part of a
group but the group was not selected. When a different Mac OS was
selected for the new project the condition applied would result in
no template being found.
Diffstat (limited to 'main/src/core')
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/SolutionTemplate.cs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/SolutionTemplate.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/SolutionTemplate.cs index 2c1acc5cce..f5f888f330 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/SolutionTemplate.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/SolutionTemplate.cs @@ -114,14 +114,18 @@ namespace MonoDevelop.Ide.Templates public void AddGroupTemplate (SolutionTemplate template)
{
groupedTemplates.Add (template);
+ template.Parent = this;
if (!availableLanguages.Contains (template.Language)) {
availableLanguages.Add (template.Language);
}
}
+ internal SolutionTemplate Parent { get; set; }
+
internal void ClearGroupedTemplates ()
{
+ Parent = null;
groupedTemplates.Clear ();
}
@@ -141,6 +145,9 @@ namespace MonoDevelop.Ide.Templates return this;
}
+ if (Parent != null)
+ return Parent.GetTemplate (predicate);
+
return groupedTemplates.FirstOrDefault (template => predicate (template));
}
|