Free cookie consent management tool by TermsFeed Policy Generator

Changeset 5318


Ignore:
Timestamp:
01/18/11 09:48:37 (13 years ago)
Author:
mkommend
Message:

Corrected nested ViewHost check (ticket #1372).

File:
1 edited

Legend:

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

    r5278 r5318  
    109109      set {
    110110        if (viewType != value) {
     111          if (value == typeof(ViewHost))
     112            throw new ArgumentException("Directly nested ViewHosts are not allowed.");
    111113          if (value != null && Content != null && !ViewCanShowContent(value, Content))
    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.");
     114            throw new ArgumentException(string.Format("View \"{0}\" cannot display content \"{1}\".", value, Content.GetType()));
    115115
    116116          viewType = value;
Note: See TracChangeset for help on using the changeset viewer.