Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/08/12 19:13:14 (12 years ago)
Author:
gkronber
Message:

#1669 merged r7209:7283 from trunk into regression benchmark branch

Location:
branches/RegressionBenchmarks
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/RegressionBenchmarks

  • branches/RegressionBenchmarks/HeuristicLab.Analysis.Views/3.3/DataTableHistoryView.cs

    r6628 r7290  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    3838      if (current == null) return;
    3939      using (DataTableVisualPropertiesDialog dialog = new DataTableVisualPropertiesDialog(current)) {
    40         if (dialog.ShowDialog() != DialogResult.OK) return;
    41         Dictionary<string, bool> changeDisplayName = new Dictionary<string, bool>();
    42         foreach (DataRow row in current.Rows) {
    43           var answer = MessageBox.Show("Change display name for series " + row.Name + " to " + row.VisualProperties.DisplayName + " for all frames?", "Confirm change", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2);
    44           if (answer == DialogResult.Cancel) return;
    45           changeDisplayName[row.Name] = (answer == DialogResult.Yes);
    46         }
     40        if (dialog.ShowDialog(this) != DialogResult.OK) return;
     41        HashSet<string> modifiedDisplayNames = new HashSet<string>(dialog.RowsWithModifiedDisplayNames);
    4742        foreach (DataTable dt in Content) {
    4843          if (current == dt) continue;
     
    5146            if (!dt.Rows.ContainsKey(row.Name)) continue;
    5247            string oldDisplayName = dt.Rows[row.Name].VisualProperties.DisplayName;
    53             var props = (DataRowVisualProperties)row.VisualProperties.Clone();
    54             if (!changeDisplayName[row.Name]) props.DisplayName = oldDisplayName;
    55             dt.Rows[row.Name].VisualProperties = props;
     48            dt.Rows[row.Name].VisualProperties = (DataRowVisualProperties)row.VisualProperties.Clone();
     49            if (!modifiedDisplayNames.Contains(row.Name))
     50              dt.Rows[row.Name].VisualProperties.DisplayName = oldDisplayName;
    5651          }
    5752        }
    5853      }
    5954    }
    60 
    6155  }
    6256}
Note: See TracChangeset for help on using the changeset viewer.