Hi,
is there a way to select a node programmatically?
I tried a code snippet that I found in the MITK code base, but it does not
work.
------------------------------------------------
d->referenceNode->SetSelected(false);
d->surfaceNode->SetSelected(true);
// EMULATE INITIAL SELECTION EVENTS
// send the current selection
berry::IWorkbenchPart::Pointer activePart =
this->GetSite()->GetPage()->GetActivePart();
if (activePart.IsNotNull())
{
QList < itk::SmartPointer<mitk::DataNode> > currentSelection =
this->GetCurrentSelection();
this->OnSelectionChanged(activePart, currentSelection);
}
------------------------------------------------
d->referenceNode and d->surfaceNode are added to the data storage. The
problem is that even I change their "selected" property, the
currentSelection is empty.
Any idea?
Thank you,
Miklos
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users