mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-29 07:24:13 +01:00
LP-567 fix spurious Settings node expand when selecting a Data item
was due a regression in the parent() method
This commit is contained in:
parent
0a40850574
commit
d28cf2a070
@ -295,11 +295,10 @@ QModelIndex UAVObjectTreeModel::parent(const QModelIndex &index) const
|
||||
return QModelIndex();
|
||||
}
|
||||
|
||||
TreeItem *item = static_cast<TreeItem *>(index.internalPointer());
|
||||
TreeItem *childItem = static_cast<TreeItem *>(index.internalPointer());
|
||||
TreeItem *parentItem = childItem->parent();
|
||||
|
||||
TreeItem *parentItem = item->parent();
|
||||
if (!parentItem) {
|
||||
// item is root has no parent...
|
||||
if (parentItem == m_rootItem) {
|
||||
return QModelIndex();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user