Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/27/14 09:35:43 (10 years ago)
Author:
jkarder
Message:

#2116: reverted to r10041

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/Breadcrumbs/HeuristicLab.Optimization.Views/3.3/RunView.cs

    r10103 r11591  
    2626using HeuristicLab.Core.Views;
    2727using HeuristicLab.MainForm;
    28 using HeuristicLab.MainForm.WindowsForms;
    2928
    3029namespace HeuristicLab.Optimization.Views {
     
    128127
    129128    private void listView_SelectedIndexChanged(object sender, EventArgs e) {
    130       if (listView.SelectedItems.Count == 1) {
    131         var item = (IItem)listView.SelectedItems[0].Tag;
    132         var mainForm = MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>();
    133         var outermostViewHost = mainForm.ShowContentInOutermostViewHost(item, this, true);
    134         if (outermostViewHost != null && outermostViewHost.HotlinkingEnabled) {
    135           outermostViewHost.ActiveView.ReadOnly = ReadOnly;
    136           outermostViewHost.ActiveView.Locked = Locked;
     129      if (showDetailsCheckBox.Checked) {
     130        if (listView.SelectedItems.Count == 1) {
     131          detailsGroupBox.Enabled = true;
     132          viewHost.Content = listView.SelectedItems[0].Tag as IContent;
    137133        } else {
    138           if (showDetailsCheckBox.Checked) {
    139             detailsGroupBox.Enabled = true;
    140             viewHost.Content = item;
    141           } else {
    142             viewHost.Content = null;
    143             detailsGroupBox.Enabled = false;
    144           }
     134          viewHost.Content = null;
     135          detailsGroupBox.Enabled = false;
    145136        }
    146137      }
     
    148139    private void listView_DoubleClick(object sender, EventArgs e) {
    149140      if (listView.SelectedItems.Count == 1) {
    150         var item = (IItem)listView.SelectedItems[0].Tag;
    151         var mainForm = MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>();
    152         var outermostViewHost = mainForm.ShowContentInOutermostViewHost(item, this);
    153         if (outermostViewHost != null) {
    154           outermostViewHost.ActiveView.ReadOnly = ReadOnly;
    155           outermostViewHost.ActiveView.Locked = Locked;
     141        IItem item = (IItem)listView.SelectedItems[0].Tag;
     142        IContentView view = MainFormManager.MainForm.ShowContent(item);
     143        if (view != null) {
     144          view.ReadOnly = true;
     145          view.Locked = Locked;
    156146        }
    157147      }
Note: See TracChangeset for help on using the changeset viewer.