diff --git a/ground/gcs/src/plugins/opmap/opmap_edit_waypoint_dialog.cpp b/ground/gcs/src/plugins/opmap/opmap_edit_waypoint_dialog.cpp index 2f65bde46..0b41bc21f 100644 --- a/ground/gcs/src/plugins/opmap/opmap_edit_waypoint_dialog.cpp +++ b/ground/gcs/src/plugins/opmap/opmap_edit_waypoint_dialog.cpp @@ -2,7 +2,8 @@ ****************************************************************************** * * @file opmap_edit_waypoint_dialog.cpp - * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012. + * @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2017. + * The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012. * @addtogroup GCSPlugins GCS Plugins * @{ * @addtogroup OPMapPlugin OpenPilot Map Plugin @@ -93,12 +94,6 @@ opmap_edit_waypoint_dialog::~opmap_edit_waypoint_dialog() delete ui; } -void opmap_edit_waypoint_dialog::on_pushButtonOK_clicked() -{ - mapper->submit(); - close(); -} - void opmap_edit_waypoint_dialog::setupModeWidgets() { MapDataDelegate::ModeOptions mode = (MapDataDelegate::ModeOptions)ui->cbMode->itemData(ui->cbMode->currentIndex()).toInt(); @@ -263,11 +258,6 @@ void opmap_edit_waypoint_dialog::setupConditionWidgets() } } -void opmap_edit_waypoint_dialog::pushButtonCancel_clicked() -{ - mapper->revert(); - close(); -} void opmap_edit_waypoint_dialog::editWaypoint(mapcontrol::WayPointItem *waypoint_item) { if (!waypoint_item) { @@ -287,16 +277,34 @@ void opmap_edit_waypoint_dialog::editWaypoint(mapcontrol::WayPointItem *waypoint mapper->setCurrentIndex(waypoint_item->Number()); } -void opmap_edit_waypoint_dialog::on_pushButton_clicked() +void opmap_edit_waypoint_dialog::on_pushButtonOK_clicked() +{ + mapper->submit(); + close(); +} + +void opmap_edit_waypoint_dialog::pushButtonCancel_clicked() +{ + mapper->revert(); + close(); +} + +void opmap_edit_waypoint_dialog::on_pushButtonPrevious_clicked() { mapper->toPrevious(); } -void opmap_edit_waypoint_dialog::on_pushButton_2_clicked() +void opmap_edit_waypoint_dialog::on_pushButtonNext_clicked() { mapper->toNext(); } +void opmap_edit_waypoint_dialog::on_pushButtonApply_clicked() +{ + mapper->submit(); +} + + void opmap_edit_waypoint_dialog::enableEditWidgets(bool value) { QWidget *w; diff --git a/ground/gcs/src/plugins/opmap/opmap_edit_waypoint_dialog.h b/ground/gcs/src/plugins/opmap/opmap_edit_waypoint_dialog.h index 84f7303ea..a9e8a7b37 100644 --- a/ground/gcs/src/plugins/opmap/opmap_edit_waypoint_dialog.h +++ b/ground/gcs/src/plugins/opmap/opmap_edit_waypoint_dialog.h @@ -2,7 +2,8 @@ ****************************************************************************** * * @file opmap_edit_waypoint_dialog.h - * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012. + * @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2017. + * The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012. * @addtogroup GCSPlugins GCS Plugins * @{ * @addtogroup OPMapPlugin OpenPilot Map Plugin @@ -63,8 +64,9 @@ private slots: void setupConditionWidgets(); void pushButtonCancel_clicked(); void on_pushButtonOK_clicked(); - void on_pushButton_clicked(); - void on_pushButton_2_clicked(); + void on_pushButtonApply_clicked(); + void on_pushButtonPrevious_clicked(); + void on_pushButtonNext_clicked(); void enableEditWidgets(bool); void currentRowChanged(QModelIndex, QModelIndex); }; diff --git a/ground/gcs/src/plugins/opmap/opmap_edit_waypoint_dialog.ui b/ground/gcs/src/plugins/opmap/opmap_edit_waypoint_dialog.ui index c70b2967f..597c3e6ac 100644 --- a/ground/gcs/src/plugins/opmap/opmap_edit_waypoint_dialog.ui +++ b/ground/gcs/src/plugins/opmap/opmap_edit_waypoint_dialog.ui @@ -789,14 +789,14 @@ - + Previous - + Next @@ -815,6 +815,13 @@ + + + + Apply + + +