Exemplo n.º 1
0
//--------------------------------------------------------------------------------------------------
/// 
//--------------------------------------------------------------------------------------------------
PdmObjectHandle* PdmUiObjectEditorHandle::pdmObject()
{
    PdmUiObjectHandle* uiObject = dynamic_cast<PdmUiObjectHandle*>(pdmItem());
    if (uiObject)
    {
        return uiObject->objectHandle();
    }
    else
    {
        return nullptr;
    }
}
Exemplo n.º 2
0
//--------------------------------------------------------------------------------------------------
/// 
//--------------------------------------------------------------------------------------------------
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);
}