X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_FilterLibraryDlg.cxx;h=2972d8cda38fadd75a7ef840350523c3e19806ac;hp=2fc4c48fd58947ca399c36f6ebac37713fc73e97;hb=ad3cb4c93852dbc834d7075c087bbc749197454b;hpb=6bac08c1a81f34d3f21c550bd92f83654b2546a5 diff --git a/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx b/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx index 2fc4c48fd..2972d8cda 100644 --- a/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2016 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 @@ -153,7 +153,7 @@ void SMESHGUI_FilterLibraryDlg::construct (const QList& theTypes, aDlgLay->setStretchFactor(myMainFrame, 1); - myHelpFileName = "selection_filter_library_page.html"; + myHelpFileName = "selection_filter_library.html"; Init(myTypes, myMode); } @@ -517,7 +517,7 @@ void SMESHGUI_FilterLibraryDlg::onHelp() //======================================================================= // name : SMESHGUI_FilterLibraryDlg::onDeactivate -// Purpose : SLOT called when dialog must be deativated +// Purpose : SLOT called when dialog must be deactivated //======================================================================= void SMESHGUI_FilterLibraryDlg::onDeactivate() { @@ -602,7 +602,7 @@ QStringList SMESHGUI_FilterLibraryDlg::prepareFilters() const //================================================================ // Function : onBrowse -// Purpose : SLOT. Display "Open file" dialog for chosing library name +// Purpose : SLOT. Display "Open file" dialog for choosing library name //================================================================ void SMESHGUI_FilterLibraryDlg::onBrowse() { @@ -611,7 +611,7 @@ void SMESHGUI_FilterLibraryDlg::onBrowse() //aDlg->setMode(myMode == COPY_FROM ? QFileDialogP::ExistingFile : QFileDialogP::AnyFile); aDlg->setFileMode(myMode == COPY_FROM ? QFileDialog::ExistingFile : QFileDialog::AnyFile); - aDlg->setFilters(prepareFilters()); + aDlg->setNameFilters(prepareFilters()); aDlg->selectFile(getFileName()); QPushButton* anOkBtn = (QPushButton*)aDlg->findChild("OK"); @@ -629,8 +629,8 @@ void SMESHGUI_FilterLibraryDlg::onBrowse() if (QFileInfo(fName).suffix().isEmpty()) fName = autoExtension(fName); - fName = QDir::convertSeparators(fName); - QString prev = QDir::convertSeparators(getFileName()); + fName = QDir::toNativeSeparators(fName); + QString prev = QDir::toNativeSeparators(getFileName()); if (prev == fName) return; @@ -756,7 +756,7 @@ bool SMESHGUI_FilterLibraryDlg::isPermissionValid(const bool theIsExistingOnly) if (QFileInfo(fName).suffix().isEmpty()) fName = autoExtension(fName); - fName = QDir::convertSeparators(fName); + fName = QDir::toNativeSeparators(fName); if (QFileInfo(fName).exists()) { isWritable = QFileInfo(fName).isWritable(); @@ -1205,11 +1205,11 @@ void SMESHGUI_FilterLibraryDlg::onSelectionDone() return; const int type = myTable->GetCriterionType(aRow); - QList types; - types << SMESH::FT_BelongToGeom << SMESH::FT_BelongToPlane - << SMESH::FT_BelongToCylinder << SMESH::FT_BelongToGenSurface - << SMESH::FT_LyingOnGeom << SMESH::FT_CoplanarFaces - << SMESH::FT_ConnectedElements; + QList types; + types << SMESH::FT_BelongToGeom << SMESH::FT_BelongToPlane + << SMESH::FT_BelongToCylinder << SMESH::FT_BelongToGenSurface + << SMESH::FT_LyingOnGeom << SMESH::FT_CoplanarFaces + << SMESH::FT_ConnectedElements << SMESH::FT_BelongToMeshGroup; if ( !types.contains( type )) return; @@ -1241,6 +1241,10 @@ void SMESHGUI_FilterLibraryDlg::onSelectionDone() } break; } + case SMESH::FT_BelongToMeshGroup: // get a group name and IOR + { + myTable->SetThreshold(aRow, anIO->getName() ); + } default: // get a GEOM object { GEOM::GEOM_Object_var anObj = SMESH::IObjectToInterface(anIO);