From 385f08cdaa554b4de0c34e168bef39bcc16f7171 Mon Sep 17 00:00:00 2001 From: Christian Hornung Date: Sun, 19 Oct 2008 14:03:43 +0000 Subject: [PATCH] Fixed SD2-1468 - Custom components tab does not show control with missing constructor. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@3607 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../FormsDesigner/Project/Src/Gui/CustomComponentsSideTab.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Gui/CustomComponentsSideTab.cs b/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Gui/CustomComponentsSideTab.cs index be01e4e5c4..147e954e64 100644 --- a/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Gui/CustomComponentsSideTab.cs +++ b/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Gui/CustomComponentsSideTab.cs @@ -88,8 +88,9 @@ namespace ICSharpCode.FormsDesigner.Gui continue; } foreach (IClass c in pc.Classes) { - if (!c.Methods.Any( - (IMethod method) => method.IsConstructor && method.IsPublic && method.Parameters.Count == 0 + var ctors = c.Methods.Where(method => method.IsConstructor); + if (ctors.Any() && !ctors.Any( + (IMethod method) => method.IsPublic && method.Parameters.Count == 0 )) { // do not include classes that don't have a public parameterless constructor continue;