Free cookie consent management tool by TermsFeed Policy Generator

Changeset 3421


Ignore:
Timestamp:
04/19/10 21:35:07 (15 years ago)
Author:
mkommend
Message:

fixed bug in MainForm (ticket #972)

File:
1 edited

Legend:

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

    r3403 r3421  
    227227      if (view == null || views.ContainsKey(view))
    228228        return view;
    229       IView viewHost =
    230         (from ViewHost v in views.Keys.OfType<ViewHost>()
    231          where v.Views.Contains(((IContentView)view))
    232          select v).SingleOrDefault();
    233       return viewHost;
    234     }
    235 
     229      IContentView contentView = view as IContentView;
     230      if (contentView != null) {
     231        IView viewHost =
     232          (from ViewHost v in views.Keys.OfType<ViewHost>()
     233           where v.Views.Contains(contentView)
     234           select v).SingleOrDefault();
     235        return viewHost;
     236      }
     237      return contentView;
     238    }
    236239
    237240    internal void ShowView(IView view) {
Note: See TracChangeset for help on using the changeset viewer.