Make select all not take quadratic time

Originally committed to SVN as r4794.
This commit is contained in:
Thomas Goyne 2010-10-08 06:06:38 +00:00
parent 4bf3b44cc0
commit 8545446baa

View file

@ -1172,8 +1172,9 @@ void BaseGrid::OnKeyPress(wxKeyEvent &event) {
// Select all
if (key == 'A' && ctrl && !alt && !shift) {
int rows = GetRows();
for (int i=0;i<rows;i++) SelectRow(i,true);
Selection sel;
std::copy(index_line_map.begin(), index_line_map.end(), std::inserter(sel, sel.end()));
SetSelectedSet(sel);
}
// Up/down