From 4638a82b7553d5253e4969e9270ffae3e4a7df35 Mon Sep 17 00:00:00 2001 From: ephy Date: Fri, 26 Mar 2010 07:42:37 +0000 Subject: [PATCH] GCS/coreplugin: Minor change to iuavgadget. git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@389 ebee16cc-31ac-478f-84a7-5cbb03baadba --- ground/src/plugins/coreplugin/iuavgadget.cpp | 7 +++++++ ground/src/plugins/coreplugin/iuavgadget.h | 1 + 2 files changed, 8 insertions(+) diff --git a/ground/src/plugins/coreplugin/iuavgadget.cpp b/ground/src/plugins/coreplugin/iuavgadget.cpp index 6d9ba63ca..e5fb432c5 100644 --- a/ground/src/plugins/coreplugin/iuavgadget.cpp +++ b/ground/src/plugins/coreplugin/iuavgadget.cpp @@ -51,6 +51,13 @@ void IUAVGadget::loadConfiguration(int index) { loadConfiguration(config); } +void IUAVGadget::setActiveConfiguration(IUAVGadgetConfiguration *config) +{ + m_activeConfiguration = config; + int index = m_toolbar->findText(config->name()); + m_toolbar->setCurrentIndex(index); + +} void IUAVGadget::configurationChanged(IUAVGadgetConfiguration* config) { diff --git a/ground/src/plugins/coreplugin/iuavgadget.h b/ground/src/plugins/coreplugin/iuavgadget.h index de561433c..c537da45d 100644 --- a/ground/src/plugins/coreplugin/iuavgadget.h +++ b/ground/src/plugins/coreplugin/iuavgadget.h @@ -56,6 +56,7 @@ public: virtual void loadConfiguration(IUAVGadgetConfiguration* /*config*/) { } IUAVGadgetConfiguration *activeConfiguration() { return m_activeConfiguration; } + void setActiveConfiguration(IUAVGadgetConfiguration *config); QComboBox *toolBar() { return m_toolbar; } virtual QByteArray saveState(); virtual void restoreState(QByteArray state);