From 5404273e7c4873340bbe8c89801f5065d47e2bc0 Mon Sep 17 00:00:00 2001 From: ephy Date: Sun, 28 Mar 2010 09:49:07 +0000 Subject: [PATCH] GCS/map: Minor change to map gadget. git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@403 ebee16cc-31ac-478f-84a7-5cbb03baadba --- ground/src/plugins/map/mapgadgetconfiguration.cpp | 4 +++- ground/src/plugins/map/mapgadgetfactory.cpp | 2 +- ground/src/plugins/map/mapgadgetoptionspage.cpp | 4 ++-- ground/src/plugins/map/mapgadgetoptionspage.h | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ground/src/plugins/map/mapgadgetconfiguration.cpp b/ground/src/plugins/map/mapgadgetconfiguration.cpp index 26419e4fa..e1fe883fc 100644 --- a/ground/src/plugins/map/mapgadgetconfiguration.cpp +++ b/ground/src/plugins/map/mapgadgetconfiguration.cpp @@ -30,7 +30,9 @@ MapGadgetConfiguration::MapGadgetConfiguration(QString classId, const QByteArray &state, QObject *parent) : IUAVGadgetConfiguration(classId, parent), - m_defaultZoom(10) + m_defaultZoom(10), + m_defaultLatitude(0), + m_defaultLongitude(0) { if (state.count() > 0) { QDataStream stream(state); diff --git a/ground/src/plugins/map/mapgadgetfactory.cpp b/ground/src/plugins/map/mapgadgetfactory.cpp index bd1d7e545..bf3661253 100644 --- a/ground/src/plugins/map/mapgadgetfactory.cpp +++ b/ground/src/plugins/map/mapgadgetfactory.cpp @@ -53,6 +53,6 @@ IUAVGadgetConfiguration *MapGadgetFactory::createConfiguration(const QByteArray IOptionsPage *MapGadgetFactory::createOptionsPage(IUAVGadgetConfiguration *config) { - return new MapGadgetOptionsPage(config); + return new MapGadgetOptionsPage(qobject_cast(config)); } diff --git a/ground/src/plugins/map/mapgadgetoptionspage.cpp b/ground/src/plugins/map/mapgadgetoptionspage.cpp index cacfed77a..3f5806f51 100644 --- a/ground/src/plugins/map/mapgadgetoptionspage.cpp +++ b/ground/src/plugins/map/mapgadgetoptionspage.cpp @@ -34,9 +34,9 @@ #include -MapGadgetOptionsPage::MapGadgetOptionsPage(IUAVGadgetConfiguration *config, QObject *parent) : +MapGadgetOptionsPage::MapGadgetOptionsPage(MapGadgetConfiguration *config, QObject *parent) : IOptionsPage(parent), - m_config(qobject_cast(config)) + m_config(config) { } diff --git a/ground/src/plugins/map/mapgadgetoptionspage.h b/ground/src/plugins/map/mapgadgetoptionspage.h index dd008a4e0..841dbde07 100644 --- a/ground/src/plugins/map/mapgadgetoptionspage.h +++ b/ground/src/plugins/map/mapgadgetoptionspage.h @@ -43,7 +43,7 @@ class MapGadgetOptionsPage : public IOptionsPage { Q_OBJECT public: - explicit MapGadgetOptionsPage(IUAVGadgetConfiguration *config, QObject *parent = 0); + explicit MapGadgetOptionsPage(MapGadgetConfiguration *config, QObject *parent = 0); QString id() const { return ""; } QString trName() const { return ""; } QString category() const { return ""; }