1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-02 10:24:11 +01:00

OP-706 Fixed an issue with metadata tree nodes not showing correct known statux.

This commit is contained in:
m_thread 2014-10-17 01:01:50 +02:00
parent 3246cf9756
commit 1ac94cfb71
2 changed files with 8 additions and 2 deletions

View File

@ -71,7 +71,7 @@ public:
virtual void apply() {} virtual void apply() {}
virtual bool isKnown() virtual bool isKnown()
{ {
return !m_field->getObject()->isSettingsObject() || m_field->getObject()->isKnown(); return parent()->isKnown();
} }

View File

@ -314,6 +314,12 @@ public:
MetaObjectTreeItem(UAVObject *object, const QVariant &data, TreeItem *parent = 0) : MetaObjectTreeItem(UAVObject *object, const QVariant &data, TreeItem *parent = 0) :
ObjectTreeItem(data, object, parent) ObjectTreeItem(data, object, parent)
{} {}
bool isKnown()
{
return parent()->isKnown();
}
}; };
class DataObjectTreeItem : public ObjectTreeItem { class DataObjectTreeItem : public ObjectTreeItem {
@ -374,7 +380,7 @@ public:
QVariant data(int column) const; QVariant data(int column) const;
bool isKnown() bool isKnown()
{ {
return !m_field->getObject()->isSettingsObject() || m_field->getObject()->isKnown(); return parent()->isKnown();
} }
private: private: