Remove padding to the left in TreeSelectionEditor if the tree doesn't have grand children.

This commit is contained in:
Gaute Lindkvist
2018-09-28 15:50:16 +02:00
parent ac8c6edafa
commit fcda0b9755
4 changed files with 27 additions and 3 deletions

View File

@@ -218,6 +218,14 @@ bool caf::PdmUiTreeSelectionQModel::isChecked(const QModelIndex& index) const
return data(index, Qt::CheckStateRole).toBool();
}
//--------------------------------------------------------------------------------------------------
/// Checks if this is a real tree with grand children or just a list of children.
//--------------------------------------------------------------------------------------------------
bool caf::PdmUiTreeSelectionQModel::hasGrandChildren() const
{
return m_tree && m_tree->hasGrandChildren();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------