597{
598 wxGridBlocks cell_array =
grid->GetSelectedBlocks();
599 auto iter = cell_array.begin();
600
601 int left_col, right_col, top_row, bottom_row;
602 if (iter == cell_array.end()) {
603
604
605
606 left_col = right_col = col;
607 top_row = bottom_row = row;
608 } else {
609 left_col = iter->GetLeftCol();
610 right_col = iter->GetRightCol();
611 top_row = iter->GetTopRow();
612 bottom_row = iter->GetBottomRow();
613 }
614
615 if ((left_col == right_col) &&
616 (top_row == bottom_row)) {
617 wxGridCellBoolEditor::DoActivate(row, col,
grid);
618 grid->SelectBlock(row, col, row, col,
true);
619 return;
620 }
621 else if( (left_col == right_col) &&
622 (top_row != bottom_row)){
623
624 for (auto i = top_row; i <= bottom_row; i++) {
625
626 wxGridCellBoolEditor::DoActivate(i, left_col,
grid);
627 }
628 }
629
630 wxGridCellBoolEditor::DoActivate(row, col,
grid);
631 grid->SelectBlock(row, col, row, col,
true);
632}
std::vector< ArithmeticOnly< T > > grid(const T &start, const T &stop, const T &stride)
A set of equidistant values starting from 'start' (inclusive), ending in the closest multiple of 'str...
Definition MTUtils.hpp:127