Added select all to grid

Originally committed to SVN as r118.
This commit is contained in:
Rodrigo Braz Monteiro 2006-02-22 20:20:45 +00:00
parent a541cbeccc
commit 7f76ab7808
1 changed files with 9 additions and 5 deletions

View File

@ -911,6 +911,9 @@ void BaseGrid::OnKeyPress(wxKeyEvent &event) {
// Get scan code
int key = event.KeyCode();
bool ctrl = event.m_controlDown;
bool alt = event.m_altDown;
bool shift = event.m_shiftDown;
// Left/right, forward to seek bar if video is loaded
if (key == WXK_LEFT || key == WXK_RIGHT) {
@ -923,6 +926,12 @@ void BaseGrid::OnKeyPress(wxKeyEvent &event) {
return;
}
// Select all
if (key == 'A' && ctrl && !alt && !shift) {
int rows = GetRows();
for (int i=0;i<rows;i++) SelectRow(i,true);
}
// Up/down
int dir = 0;
int step = 1;
@ -947,11 +956,6 @@ void BaseGrid::OnKeyPress(wxKeyEvent &event) {
// Moving
if (dir) {
// Modifiers
bool ctrl = event.m_controlDown;
bool alt = event.m_altDown;
bool shift = event.m_shiftDown;
// Move selection
if (!ctrl && !shift && !alt) {
// Move to extent first