Free cookie consent management tool by TermsFeed Policy Generator

Changeset 3255


Ignore:
Timestamp:
04/01/10 22:50:20 (13 years ago)
Author:
swagner
Message:

Fixed MainFormManager.GetViewTypes that it includes default views in each case (#958).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.MainForm/3.2/MainFormManager.cs

    r2992 r3255  
    8888      List<Type> viewTypes = new List<Type>(GetViewTypes(contentType));
    8989      if (returnOnlyMostSpecificViewTypes) {
     90        Type defaultViewType = null;
     91        try {
     92          defaultViewType = GetDefaultViewType(contentType);
     93        }
     94        catch (InvalidOperationException) { }
     95
    9096        foreach (Type viewType in viewTypes.ToList()) {
    91           if(viewTypes.Any(t => t.IsSubclassOf(viewType)))
     97          if((viewType != defaultViewType) && viewTypes.Any(t => t.IsSubclassOf(viewType)))
    9298            viewTypes.Remove(viewType);
    9399        }
Note: See TracChangeset for help on using the changeset viewer.