Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/04/14 12:30:08 (10 years ago)
Author:
mleitner
Message:

Update correlationmatrix on preprocessing data change - improve performance on datagrid selection.

File:
1 edited

Legend:

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

    r10930 r10934  
    3636    private bool notOwnEvent = true;
    3737    private bool isSearching = false;
     38    private bool updateOnMouseUp = false;
    3839    private SearchAndReplaceDialog findAndReplaceDialog;
    3940    private IFindPreprocessingItemsIterator searchIterator;
     
    7071      dataGridView.CellPainting += new System.Windows.Forms.DataGridViewCellPaintingEventHandler(dataGridView_CellPainting);
    7172      dataGridView.KeyDown += dataGridView_KeyDown;
     73      dataGridView.MouseUp += dataGridView_MouseUp;
    7274      contextMenuCell.Items.Add(ShowHideColumns);
    7375      _highlightedRowIndices = new List<int>();
     
    7981      if (Content != null) {
    8082        if (!isSearching) {
     83
     84          if (Control.MouseButtons == MouseButtons.Left) {
     85            updateOnMouseUp = true;
     86            return;
     87          }
     88           
    8189          base.dataGridView_SelectionChanged(sender, e);
     90       
    8291          Content.DataGridLogic.SetSelection(GetSelectedCells());
    8392        }
    8493      }
    8594    }
     95
     96    private void dataGridView_MouseUp(object sender, MouseEventArgs e) {
     97      if (!updateOnMouseUp)
     98        return;
     99
     100      updateOnMouseUp = false;
     101      dataGridView_SelectionChanged(sender, e);
     102    }                                     
    86103
    87104    protected override void OnContentChanged() {
Note: See TracChangeset for help on using the changeset viewer.