Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Ward <matt.ward@xamarin.com>2017-07-28 17:49:16 +0300
committerMatt Ward <matt.ward@xamarin.com>2017-07-31 12:34:47 +0300
commit411bea1297688e41de4382ad393a8fde52738163 (patch)
treed294ddc6c0a436654c7a42257635bd007bd2d485 /main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates
parent39a617d71c9ba959e6a429c91201dca22d361850 (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/MonoDevelop.Ide/MonoDevelop.Ide.Templates')
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/SolutionTemplate.cs7
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));
}