Hello, I am currently working on a data node picking functionality for my plugin. My plugin uses the OnSelectionChanged method provided by Qmitkabstractview. When I click on a node inside the data manager view this method is called, as expected. But when I try to pick a node inside the renderer it is not called. My picker sets the picked node selected in two ways:
1. Setting the selection of the data manager view mitk::DataNodeSelection::Pointer selection(new mitk::DataNodeSelection(pickedNode)); this->SetDataManagerSelection(selection); 2. Setting the selected attribute of the node pickedNode->SetSelected(true); But still, there is no call of OnSelectionChanged. Then I checked how this method is called: q->OnSelectionChanged(sourcepart, this->DataNodeSelectionToQList(_DataNodeSelection)); inside QmitkAbstractView::BlueBerrySelectionChanged(...) The same here, it is also not called. Diving deeper... BlueBerrySelectionChanged is the callback function for the selection listener: // REGISTER FOR WORKBENCH SELECTION EVENTS d->m_BlueBerrySelectionListener = berry::ISelectionListener::Pointer( new berry::NullSelectionChangedAdapter<QmitkAbstractViewPrivate>(d.data(), &QmitkAbstractViewPrivate::BlueBerrySelectionChanged)); this->GetSite()->GetWorkbenchWindow()->GetSelectionService()->AddPostSelectionListener(d->m_BlueBerrySelectionListener); It seems that no selection event is entering the selection service. So I thought that I could add one by using FireNodesSelected(...). But that did not work neither. Now I am wondering about how to proceed. Is it the right way to try to implement my own selection provider in order to call BlueBerrySelectionChanged()? Do I overlook something? Thank you very much for your help. Best regards, Martin ------------------------------------------------------------------------------ Is your legacy SCM system holding you back? Join Perforce May 7 to find out: • 3 signs your SCM is hindering your productivity • Requirements for releasing software faster • Expert tips and advice for migrating your SCM now http://p.sf.net/sfu/perforce _______________________________________________ mitk-users mailing list mitk-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mitk-users