X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_FieldSelectorWdg.cxx;h=598665a6ea9698f5db91cf089ccdd99835d7de56;hb=1224f8cfd6255dec39cf45bceb42b479e9c47805;hp=8b060f647c19d1c999e820f0673fac252cc3aeaf;hpb=a17b36970bc61da1d664453c615754997c925b18;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/SMESHGUI_FieldSelectorWdg.cxx b/src/SMESHGUI/SMESHGUI_FieldSelectorWdg.cxx index 8b060f647..598665a6e 100644 --- a/src/SMESHGUI/SMESHGUI_FieldSelectorWdg.cxx +++ b/src/SMESHGUI/SMESHGUI_FieldSelectorWdg.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -86,15 +86,11 @@ SMESHGUI_FieldSelectorWdg::SMESHGUI_FieldSelectorWdg( QWidget* p ) * \brief Retrieves all fields defined on geometry of given meshes */ bool SMESHGUI_FieldSelectorWdg:: -GetAllFeilds(const QList< QPair< SMESH::SMESH_IDSource_var, QString > >& meshes, +GetAllFields(const QList< QPair< SMESH::SMESH_IDSource_var, QString > >& meshes, QList< QPair< GEOM::ListOfFields_var, QString > >& fields) { myFields = & fields; myTree->clear(); - - _PTR(Study) study = SMESH::GetActiveStudyDocument(); - GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen(); - GEOM::GEOM_IFieldOperations_wrap fieldOp = geomGen->GetIFieldOperations( study->StudyId() ); for ( int iM = 0; iM < meshes.count(); ++iM ) { @@ -110,6 +106,9 @@ GetAllFeilds(const QList< QPair< SMESH::SMESH_IDSource_var, QString > >& meshes, QTreeWidgetItem* meshItem = createItem( myTree, meshes[iM].second, iM ); GEOM::GEOM_Object_var shape = mesh->GetShapeToMesh(); + GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen( shape ); + GEOM::GEOM_IFieldOperations_wrap fieldOp = geomGen->GetIFieldOperations(); + fields = fieldOp->GetFields( shape ); for ( size_t iF = 0; iF < fields->length(); ++iF ) { @@ -166,7 +165,7 @@ GetAllFeilds(const QList< QPair< SMESH::SMESH_IDSource_var, QString > >& meshes, /*! * \brief Filter off not selected fields from myFields */ -bool SMESHGUI_FieldSelectorWdg::GetSelectedFeilds() +bool SMESHGUI_FieldSelectorWdg::GetSelectedFields() { int nbSelected = 0; if ( myTree->isEnabled() ) @@ -215,7 +214,7 @@ bool SMESHGUI_FieldSelectorWdg::GetSelectedFeilds() /*! * \brief SLOT called when a tree item is checked */ -void SMESHGUI_FieldSelectorWdg::onItemCheck(QTreeWidgetItem * item, int column) +void SMESHGUI_FieldSelectorWdg::onItemCheck(QTreeWidgetItem * item, int /*column*/) { myTree->blockSignals( true ); if ( !item->parent() ) // mesh item