1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-18 08:54:15 +01:00

GCS-Couple of bug fixes and created a new defaultRequested signal

This commit is contained in:
PT_Dreamer 2012-08-14 23:55:53 +01:00
parent 2ddb0e63d2
commit ae962f507b
2 changed files with 4 additions and 1 deletions

View File

@ -783,12 +783,14 @@ void ConfigTaskWidget::defaultButtonClicked()
*/
void ConfigTaskWidget::reloadButtonClicked()
{
if(timeOut)
return;
int group=sender()->property("group").toInt();
QList<objectToWidget*> * list=defaultReloadGroups.value(group,NULL);
if(!list)
return;
ObjectPersistence* objper = dynamic_cast<ObjectPersistence*>( getObjectManager()->getObject(ObjectPersistence::NAME) );
QTimer * timeOut=new QTimer(this);
timeOut=new QTimer(this);
QEventLoop * eventLoop=new QEventLoop(this);
connect(timeOut, SIGNAL(timeout()),eventLoop,SLOT(quit()));
connect(objper, SIGNAL(objectUpdated(UAVObject*)), eventLoop, SLOT(quit()));

View File

@ -166,6 +166,7 @@ private:
void disconnectWidgetUpdatesToSlot(QWidget *widget, const char *function);
void loadWidgetLimits(QWidget *widget, UAVObjectField *field, int index, bool hasLimits, double sclale);
QString outOfLimitsStyle;
QTimer * timeOut;
protected slots:
virtual void disableObjUpdates();
virtual void enableObjUpdates();