Added special handling to expand an item in tree view

This commit is contained in:
Magne Sjaastad 2014-07-31 14:04:37 +02:00
parent 73f29bb115
commit 07b25a2f60
2 changed files with 14 additions and 1 deletions

View File

@ -2010,3 +2010,15 @@ void RiuMainWindow::appendActionsContextMenuForPdmObject(caf::PdmObject* pdmObje
menu->addAction(m_openMultipleEclipseCasesAction);
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuMainWindow::setExpanded(const caf::PdmObject* pdmObject, bool expanded)
{
QModelIndex mi = m_treeModelPdm->getModelIndexFromPdmObject(pdmObject);
if (m_treeView && mi.isValid())
{
m_treeView->setExpanded(mi, expanded);
}
}

View File

@ -97,7 +97,8 @@ public:
void appendActionsContextMenuForPdmObject(caf::PdmObject* pdmObject, QMenu* menu);
void refreshDrawStyleActions();
void setExpanded(const caf::PdmObject* pdmObject, bool expanded);
protected:
virtual void closeEvent(QCloseEvent* event);