Free cookie consent management tool by TermsFeed Policy Generator

Changeset 10863


Ignore:
Timestamp:
05/21/14 09:03:35 (11 years ago)
Author:
sbreuer
Message:
  • make selection in datagrid faster
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/DataGridContentView.cs

    r10852 r10863  
    8686
    8787    void DataGridView_SelectionChanged(object sender, EventArgs e) {
    88       if (Content != null) {
    89         Content.DataGridLogic.SetSelection(GetSelectedCells());
    90         if (AreMultipleCellsSelected()) {
    91           ResetHighlightedCellsBackground();
    92           HightlightedCellsBackground = GetSelectedCells();
    93           searchIterator = null;
    94         }
    95       }
     88      Content.DataGridLogic.SetSelection(GetSelectedCells());
    9689    }
    9790
     
    171164      findAndReplaceDialog.Show(this);
    172165      if (AreMultipleCellsSelected()) {
     166        ResetHighlightedCellsBackground();
    173167        HightlightedCellsBackground = GetSelectedCells();
    174168        dataGridView.ClearSelection();
     
    180174      findAndReplaceDialog.FormClosing += findAndReplaceDialog_FormClosing;
    181175      searchIterator = null;
     176      DataGridView.SelectionChanged += DataGridView_SelectionChanged_FindAndReplace;
     177    }
     178
     179    void DataGridView_SelectionChanged_FindAndReplace(object sender, EventArgs e) {
     180      if (Content != null) {
     181        if (AreMultipleCellsSelected()) {
     182          ResetHighlightedCellsBackground();
     183          HightlightedCellsBackground = GetSelectedCells();
     184          searchIterator = null;
     185        }
     186      }
    182187    }
    183188
     
    186191      ResetHighlightedCellsBackground();
    187192      searchIterator = null;
     193      DataGridView.SelectionChanged -= DataGridView_SelectionChanged_FindAndReplace;
    188194    }
    189195
Note: See TracChangeset for help on using the changeset viewer.