From 05ef028f9d1089ed4f1a933b047ac08872b03225 Mon Sep 17 00:00:00 2001 From: zedamota Date: Fri, 2 Mar 2012 18:47:24 +0000 Subject: [PATCH] GCS - Make the save/apply operation result icons disappear when the form contents changes. --- .../src/plugins/uavobjectwidgetutils/configtaskwidget.cpp | 1 + .../src/plugins/uavobjectwidgetutils/smartsavebutton.cpp | 6 ++++++ .../src/plugins/uavobjectwidgetutils/smartsavebutton.h | 1 + 3 files changed, 8 insertions(+) diff --git a/ground/openpilotgcs/src/plugins/uavobjectwidgetutils/configtaskwidget.cpp b/ground/openpilotgcs/src/plugins/uavobjectwidgetutils/configtaskwidget.cpp index 6e0cdd96e..4bb570295 100644 --- a/ground/openpilotgcs/src/plugins/uavobjectwidgetutils/configtaskwidget.cpp +++ b/ground/openpilotgcs/src/plugins/uavobjectwidgetutils/configtaskwidget.cpp @@ -412,6 +412,7 @@ void ConfigTaskWidget::widgetsContentsChanged() } } } + smartsave->resetIcons(); setDirty(true); } /** diff --git a/ground/openpilotgcs/src/plugins/uavobjectwidgetutils/smartsavebutton.cpp b/ground/openpilotgcs/src/plugins/uavobjectwidgetutils/smartsavebutton.cpp index 36da08758..31ae969eb 100644 --- a/ground/openpilotgcs/src/plugins/uavobjectwidgetutils/smartsavebutton.cpp +++ b/ground/openpilotgcs/src/plugins/uavobjectwidgetutils/smartsavebutton.cpp @@ -192,6 +192,12 @@ void smartSaveButton::enableControls(bool value) button->setEnabled(value); } +void smartSaveButton::resetIcons() +{ + foreach(QPushButton * button,buttonList.keys()) + button->setIcon(QIcon()); +} + void smartSaveButton::apply() { processOperation(NULL,false); diff --git a/ground/openpilotgcs/src/plugins/uavobjectwidgetutils/smartsavebutton.h b/ground/openpilotgcs/src/plugins/uavobjectwidgetutils/smartsavebutton.h index 6931cee92..03b96ff39 100644 --- a/ground/openpilotgcs/src/plugins/uavobjectwidgetutils/smartsavebutton.h +++ b/ground/openpilotgcs/src/plugins/uavobjectwidgetutils/smartsavebutton.h @@ -52,6 +52,7 @@ public: void removeAllObjects(); void addApplyButton(QPushButton *apply); void addSaveButton(QPushButton *save); + void resetIcons(); signals: void preProcessOperations(); void saveSuccessfull();