mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[Feature] Add Toolbox / Table shortcuts (#327)
This commit is contained in:
@@ -140,6 +140,12 @@ bool NestedMenuController::handleEventForRow(Ion::Events::Event event, int rowIn
|
||||
if ((event == Ion::Events::Back || event == Ion::Events::Left) && depth > 0) {
|
||||
return returnToPreviousMenu();
|
||||
}
|
||||
if (event == Ion::Events::ShiftLeft && depth > 0) {
|
||||
for (int i = depth; i > 0; i--) {
|
||||
returnToPreviousMenu();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if (selectedRow() < 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -128,15 +128,27 @@ bool SelectableTableView::handleEvent(Ion::Events::Event event) {
|
||||
if (event == Ion::Events::Down) {
|
||||
return selectCellAtLocation(selectedColumn(), selectedRow()+1);
|
||||
}
|
||||
if (event == Ion::Events::ShiftDown && selectedRow() < dataSource()->numberOfRows()-1) {
|
||||
return selectCellAtLocation(selectedColumn(), dataSource()->numberOfRows()-1);
|
||||
}
|
||||
if (event == Ion::Events::Up) {
|
||||
return selectCellAtLocation(selectedColumn(), selectedRow()-1);
|
||||
}
|
||||
if (event == Ion::Events::ShiftUp && selectedRow() > 0) {
|
||||
return selectCellAtLocation(selectedColumn(), 0);
|
||||
}
|
||||
if (event == Ion::Events::Left) {
|
||||
return selectCellAtLocation(selectedColumn()-1, selectedRow());
|
||||
}
|
||||
if (event == Ion::Events::ShiftLeft && selectedColumn() > 0) {
|
||||
return selectCellAtLocation(0, selectedRow());
|
||||
}
|
||||
if (event == Ion::Events::Right) {
|
||||
return selectCellAtLocation(selectedColumn()+1, selectedRow());
|
||||
}
|
||||
if (event == Ion::Events::ShiftRight && selectedColumn() < dataSource()->numberOfColumns()-1) {
|
||||
return selectCellAtLocation(dataSource()->numberOfColumns()-1, selectedRow());
|
||||
}
|
||||
if (event == Ion::Events::Copy || event == Ion::Events::Cut) {
|
||||
HighlightCell * cell = selectedCell();
|
||||
if (cell == nullptr) {
|
||||
|
||||
Reference in New Issue
Block a user