X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPlugins%2FMEDReader%2FParaViewPlugin%2FpqExtractCellTypePanel.cxx;h=28043b79b6db11fb5633376bc2294486d4e2fbeb;hb=bae87bd664530e90e6106a91a0e24051fc971b7d;hp=07fe5fb128eaa23a61cb21d8d09556211e2113fc;hpb=e4350e9cdbb25c86c1b7caa25182a8c99381ead9;p=modules%2Fparavis.git diff --git a/src/Plugins/MEDReader/ParaViewPlugin/pqExtractCellTypePanel.cxx b/src/Plugins/MEDReader/ParaViewPlugin/pqExtractCellTypePanel.cxx index 07fe5fb1..28043b79 100644 --- a/src/Plugins/MEDReader/ParaViewPlugin/pqExtractCellTypePanel.cxx +++ b/src/Plugins/MEDReader/ParaViewPlugin/pqExtractCellTypePanel.cxx @@ -3,7 +3,7 @@ // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -87,7 +87,10 @@ pqExtractCellTypePanel::pqExtractCellTypePanel(pqProxy* object_proxy, QWidget* p vtkPVSILInformation* info=vtkPVSILInformation::New(); reader->GatherInformation(info); vtkGraph *g(info->GetSIL()); - vtkMutableDirectedGraph *g2(vtkMutableDirectedGraph::SafeDownCast(g)); + //vtkMutableDirectedGraph *g2(vtkMutableDirectedGraph::SafeDownCast(g));// agy: this line does not work in client/server mode ! but it works in standard mode ! Don't know why. ParaView bug ? + vtkMutableDirectedGraph *g2(static_cast(g)); + if(!g2) + return ; int idNames(0); vtkAbstractArray *verticesNames(g2->GetVertexData()->GetAbstractArray("Names",idNames)); vtkStringArray *verticesNames2(vtkStringArray::SafeDownCast(verticesNames)); @@ -155,8 +158,12 @@ void pqExtractCellTypePanel::updateSIL() this->UI->SILUpdateStamp = stamp; vtkPVSILInformation* info = vtkPVSILInformation::New(); reader->GatherInformation(info); - this->UI->SILModel.update(info->GetSIL()); - this->UI->Fields->expandAll(); + vtkGraph *sil(info->GetSIL()); + if(sil) + { + this->UI->SILModel.update(sil); + this->UI->Fields->expandAll(); + } info->Delete(); } }