<div dir="ltr">Hello<br>
<br>
I'm trying, in my custom application, to track selection in a specific view and select point on another view consequently.<br>
By "selecting" i mean : render it in a different color in renderview,
highligth it in spreadsheet view and display it in FindData widget
"current selection" field<br>
<br>
I'm able to catch selected signal and extractt the selected cells numbers.<br>
However i am not able to manually select anything.<br>
<br>
I have try to copy the code used in the FindData widget and i've come up
with the following code , wich is suposed to select the cell with
id==0, how ever it is not working, <br>
it clears the current selection but doesn't select anything :<br>
[code]<br>
//!!!!!!!!!!!!!!!!!!!! SELECTION ? NOT WOKRING !!<br>
// Find the proper Proxy manager<br>
vtkSMSessionProxyManager* pxm =<br>
vtkSMProxyManager::GetProxyManager()->GetActiveSessionProxyManager();<br>
<br>
// Create a new selection source <br>
vtkSMProxy* selSource = pxm->NewProxy("sources",<br>
"SelectionQuerySource");<br>
<br>
vtkSMPropertyHelper(selSource, "FieldType").Set( vtkSelectionNode::CELL );<br>
<br>
selSource->UpdateVTKObjects();<br>
<br>
QString query;<br>
query = "%1 == %2";<br>
query = query.arg("id", "0");<br>
vtkSMPropertyHelper(selSource, "QueryString").Set(query.toAscii().constData());<br>
printf("query : %s \n",query.toAscii().constData());<br>
selSource->PrintSelf(std::cout, vtkIndent(0));<br>
<br>
this->reader->getOutputPort(0)->setSelectionInput(vtkSMSourceProxy::SafeDownCast(selSource), 0); <br>
pqSelectionManager * selman =
qobject_cast<pqSelectionManager*>(pqApplicationCore::instance()->manager("SELECTION_MANAGER"));<br>
selman->select(this->reader->getOutputPort(0));<br>
this->reader->getOutputPort(0)->renderAllViews( true );<br>
[/code]<br>
<br>
any idea or pointer about how to achieve that ?<br>
<br>
Thanks<br>
<br>
Mathieu</div>