Free cookie consent management tool by TermsFeed Policy Generator

Changeset 5278


Ignore:
Timestamp:
01/11/11 16:15:14 (13 years ago)
Author:
mkommend
Message:

Corrected check in setter of ViewType in the ViewHost (ticket #1372).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/ViewHost.cs

    r5270 r5278  
    108108      get { return viewType; }
    109109      set {
    110         if (viewType != value && value.GetType() != typeof(ViewHost)) {
     110        if (viewType != value) {
    111111          if (value != null && Content != null && !ViewCanShowContent(value, Content))
    112             throw new ArgumentException(string.Format("View \"{0}\" cannot display content \"{1}\".",
    113                                                       value, Content.GetType()));
     112            throw new ArgumentException(string.Format("View \"{0}\" cannot display content \"{1}\".",                            value, Content.GetType()));
     113          if (value != null && value.GetType() == typeof(ViewHost))
     114            throw new ArgumentException("Directly nested ViewHosts are not allowed.");
     115
    114116          viewType = value;
    115117          OnViewTypeChanged();
Note: See TracChangeset for help on using the changeset viewer.