Browse Source

Hotfix: Do not assert on missing param

QGC4.4
Lorenz Meier 10 years ago
parent
commit
2e1efdc25a
  1. 11
      src/FactSystem/FactBinder.cc

11
src/FactSystem/FactBinder.cc

@ -27,6 +27,7 @@
#include "FactBinder.h" #include "FactBinder.h"
#include "UASManager.h" #include "UASManager.h"
#include "AutoPilotPluginManager.h" #include "AutoPilotPluginManager.h"
#include <QDebug>
FactBinder::FactBinder(void) : FactBinder::FactBinder(void) :
_autopilotPlugin(NULL), _autopilotPlugin(NULL),
@ -60,13 +61,13 @@ void FactBinder::setName(const QString& name)
if (_autopilotPlugin->factExists(name)) { if (_autopilotPlugin->factExists(name)) {
_fact = _autopilotPlugin->getFact(name); _fact = _autopilotPlugin->getFact(name);
connect(_fact, &Fact::valueChanged, this, &FactBinder::valueChanged); connect(_fact, &Fact::valueChanged, this, &FactBinder::valueChanged);
emit valueChanged();
emit nameChanged();
} else { } else {
Q_ASSERT(false); qDebug() << "FAILED BINDING PARAM" << name << ": PARAM DOES NOT EXIST ON SYSTEM!";
} }
} }
emit valueChanged();
emit nameChanged();
} }
QVariant FactBinder::value(void) const QVariant FactBinder::value(void) const
@ -83,7 +84,7 @@ void FactBinder::setValue(const QVariant& value)
if (_fact) { if (_fact) {
_fact->setValue(value); _fact->setValue(value);
} else { } else {
Q_ASSERT(false); qDebug() << "FAILED SETTING PARAM VALUE" << value.toString() << ": PARAM DOES NOT EXIST ON SYSTEM!";
} }
} }

Loading…
Cancel
Save