From 3a0ca3c72469281eea0bdfb5764817432872b601 Mon Sep 17 00:00:00 2001 From: PT_Dreamer Date: Thu, 23 Aug 2012 16:07:10 +0100 Subject: [PATCH] GCS-ConfigTaskWidget Fixes the dirty status being wrongly set --- .../uavobjectwidgetutils/configtaskwidget.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/uavobjectwidgetutils/configtaskwidget.cpp b/ground/openpilotgcs/src/plugins/uavobjectwidgetutils/configtaskwidget.cpp index 0e5c6ddcf..5f49e1910 100644 --- a/ground/openpilotgcs/src/plugins/uavobjectwidgetutils/configtaskwidget.cpp +++ b/ground/openpilotgcs/src/plugins/uavobjectwidgetutils/configtaskwidget.cpp @@ -38,10 +38,10 @@ ConfigTaskWidget::ConfigTaskWidget(QWidget *parent) : QWidget(parent),isConnecte objManager = pm->getObject(); TelemetryManager* telMngr = pm->getObject(); utilMngr = pm->getObject(); - connect(telMngr, SIGNAL(connected()), this, SLOT(onAutopilotConnect())); - connect(telMngr, SIGNAL(disconnected()), this, SLOT(onAutopilotDisconnect())); - connect(telMngr, SIGNAL(connected()), this, SIGNAL(autoPilotConnected())); - connect(telMngr, SIGNAL(disconnected()), this, SIGNAL(autoPilotDisconnected())); + connect(telMngr, SIGNAL(connected()), this, SLOT(onAutopilotConnect()),Qt::UniqueConnection); + connect(telMngr, SIGNAL(disconnected()), this, SLOT(onAutopilotDisconnect()),Qt::UniqueConnection); + connect(telMngr, SIGNAL(connected()), this, SIGNAL(autoPilotConnected()),Qt::UniqueConnection); + connect(telMngr, SIGNAL(disconnected()), this, SIGNAL(autoPilotDisconnected()),Qt::UniqueConnection); UAVSettingsImportExportFactory * importexportplugin = pm->getObject(); connect(importexportplugin,SIGNAL(importAboutToBegin()),this,SLOT(invalidateObjects())); } @@ -285,15 +285,16 @@ void ConfigTaskWidget::forceConnectedState()//dynamic widgets don't recieve the void ConfigTaskWidget::onAutopilotConnect() { + qDebug()<<"OnAutopilotConnect:"<metaObject()->className(); if (utilMngr) currentBoard = utilMngr->getBoardModel();//TODO REMEMBER TO ADD THIS TO FORCE CONNECTED FUNC ON CC3D_RELEASE invalidateObjects(); - dirty=false; isConnected=true; foreach(objectToWidget * ow,objOfInterest) { loadWidgetLimits(ow->widget,ow->field,ow->index,ow->isLimited,ow->scale); } + setDirty(false); enableControls(true); refreshWidgetsValues(); } @@ -342,6 +343,7 @@ void ConfigTaskWidget::refreshWidgetsValues(UAVObject * obj) } setDirty(dirtyBack); + } /** * SLOT function used to update the uavobject fields from widgets with relation to