Workout Editor ^A Select all

.. forgot when doing other things.
This commit is contained in:
Mark Liversedge
2016-01-04 14:14:38 +00:00
parent 02239797ec
commit f127e39abe
2 changed files with 21 additions and 0 deletions

View File

@@ -416,6 +416,12 @@ WorkoutWidget::eventFilter(QObject *obj, QEvent *event)
updateNeeded=selectClear();
break;
case Qt::Key_A:
if (ctrl) {
updateNeeded=selectAll();
}
break;
case Qt::Key_Y:
if (ctrl) {
redo();
@@ -959,6 +965,20 @@ WorkoutWidget::deleteSelected()
return true;
}
bool
WorkoutWidget::selectAll()
{
bool selected=false;
foreach(WWPoint *p, points_) {
// if not selected, select it
if (p->selected==false)
p->selected=selected=true;
}
return selected;
}
bool
WorkoutWidget::selectPoints()
{

View File

@@ -208,6 +208,7 @@ class WorkoutWidget : public QWidget
bool deleteSelected();
// selecting
bool selectAll();
bool selectPoints(); // mark for selection with rect tool
bool selectedPoints(); // make selected at end rect tool
bool selectClear(); // clear all selections