//-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- PdmObjectHandle* PdmUiObjectEditorHandle::pdmObject() { PdmUiObjectHandle* uiObject = dynamic_cast<PdmUiObjectHandle*>(pdmItem()); if (uiObject) { return uiObject->objectHandle(); } else { return nullptr; } }
//-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- void PdmUiTreeView::slotOnSelectionChanged() { emit selectionChanged(); std::vector<PdmUiItem*> objects; m_treeViewEditor->selectedUiItems(objects); PdmObjectHandle* objHandle = NULL; if (objects.size()) { PdmUiObjectHandle* uiObjH = dynamic_cast< PdmUiObjectHandle*>(objects[0]); if (uiObjH) { objHandle = uiObjH->objectHandle(); } } emit selectedObjectChanged(objHandle); }