diff --git a/ApplicationCode/UserInterface/RiuMainWindow.cpp b/ApplicationCode/UserInterface/RiuMainWindow.cpp index a5c475fcfe..e6cab5e794 100644 --- a/ApplicationCode/UserInterface/RiuMainWindow.cpp +++ b/ApplicationCode/UserInterface/RiuMainWindow.cpp @@ -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); + } +} diff --git a/ApplicationCode/UserInterface/RiuMainWindow.h b/ApplicationCode/UserInterface/RiuMainWindow.h index 0e2aa40bee..42e1a7c8f2 100644 --- a/ApplicationCode/UserInterface/RiuMainWindow.h +++ b/ApplicationCode/UserInterface/RiuMainWindow.h @@ -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);