<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
I'm making a program that make calculation and try to integrate some Paraview stuff, every things goes fine, I have my render from the server, but when I use pqColorScaleEditor, the dialog show himself, I can change color depending on scale but when I check the legend checkbox, the application crash and I have no idea why ...<br><br>Part of my code :<br><br> void Widget3D::show_color_editor(){<br><br> scaleEdit = new pqColorScaleEditor(m_RenderView->getWidget());<br> pqDataRepresentation* repr = m_input->getRepresentation(m_RenderView);<br> scaleEdit->setRepresentation(repr);<br> scaleEdit->show();<br><br> }<br><br> void Widget3D::createView(){<br> if(m_server){<br> // create a graphics window and put it in our main window<br> this->m_RenderView = qobject_cast<pqRenderView*>(<br> m_object_builder->createView(pqRenderView::renderViewType(), m_server));<br><br> if(m_RenderView){<br> m_layout_v->insertWidget(0,this->m_RenderView->getWidget());<br> }else{<br> //NLog::globalLog()->addError("Problem when creating a RenderView.");<br> }<br> }else{<br> //NLog::globalLog()->addError("Cannot create RenderView if no paraview server connection is set.");<br> }<br><br> }<br><br> void Widget3D::showRender()<br> {<br> if(m_source){<br><br> m_input = m_source;//m_filter2;<br><br> m_object_builder->createDataRepresentation(m_input->getOutputPort(0), this->m_RenderView);<br><br> changeStyle();<br><br> pqDataRepresentation* repr = m_input->getRepresentation(m_RenderView);<br><br> this->m_color->setRepresentation(m_input->getRepresentation(m_RenderView));<br><br> //this->scaleEdit->setRepresentation(m_input->getRepresentation(m_RenderView));<br><br> qDebug() << repr->getLookupTable();<br> //m_RenderView->get<br> qDebug() << repr->getLookupTableProxy();<br><br> // zoom to object<br> this->m_RenderView->resetCamera();<br> // make sure we update<br> this->m_RenderView->render();<br><br> }else{<br> //NLog::globalLog()->addError("There is no file to render.");<br> }<br> }<br><br> Widget3D::Widget3D(QWidget *parent) :<br> QWidget(parent)<br> {<br> // automatically make a server connection<br> m_core = pqApplicationCore::instance();<br> m_object_builder = m_core->getObjectBuilder();<br><br> // Register ParaView interfaces.<br> m_plugin_manager = m_core->getPluginManager();<br><br> // adds support for standard paraview views.<br> m_plugin_manager->addInterface(new pqStandardViewModules(m_plugin_manager));<br><br> createView();<br><br> showRender();<br><br> connect(m_show_color_palet,SIGNAL(released()),this,SLOT(show_color_editor()));<br><br> }<br><br><br><br>You'll notice that I use client - server paraview architecture. What is strange is that I have no problem seting color on my mesh but the legend make the application crash. <br><br>I tryed different things like :<br> scaleEdit = new pqColorScaleEditor(m_RenderView->getWidget());<br>
scaleEdit->show();<br> => it show me that there is no map ta set the legend... So I think it found the map<br><br>Maybe the problem is that the rendering is made in server side, but I did not have problems with "pqDisplayColorWidget" that also use pqDataRepresentation.<br><br><br>Thanks for any idea, if you need the full code I can provide it.<br><br><hr size="2" width="100%"><blockquote><blockquote><b>Wertz Gil</b><br></blockquote><i>gilwertz@hotmail.com</i><br></blockquote><hr size="2" width="100%"><br><br>                                            </body>
</html>