X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI.cxx;h=5c2c18a7cf93eeed5f9fc17e82082a5e0fdc9ca0;hp=4c791176951b1161cc2618ddd0c451e5cf4fc139;hb=f8f26cfa9b40fcd528f7e032cc0e37cd3aa43086;hpb=5c5e1f2368ca2b3388f657ae028b2a6b5ce8ae36 diff --git a/src/SMESHGUI/SMESHGUI.cxx b/src/SMESHGUI/SMESHGUI.cxx index 4c7911769..5c2c18a7c 100644 --- a/src/SMESHGUI/SMESHGUI.cxx +++ b/src/SMESHGUI/SMESHGUI.cxx @@ -215,29 +215,34 @@ namespace QStringList filter; std::string myExtension; - if ( theCommandID == SMESHOp::OpImportMED ) { + if ( theCommandID == SMESHOp::OpImportMED || + theCommandID == SMESHOp::OpPopupImportMED ) { filter.append( QObject::tr( "MED_FILES_FILTER" ) + " (*.*med)" ); filter.append( QObject::tr( "ALL_FILES_FILTER" ) + " (*)" ); } - else if ( theCommandID == SMESHOp::OpImportUNV ) { + else if ( theCommandID == SMESHOp::OpImportUNV || + theCommandID == SMESHOp::OpPopupImportUNV ) { filter.append( QObject::tr( "IDEAS_FILES_FILTER" ) + " (*.unv)" ); } - else if ( theCommandID == SMESHOp::OpImportDAT ) { + else if ( theCommandID == SMESHOp::OpImportDAT || + theCommandID == SMESHOp::OpPopupImportDAT ) { filter.append( QObject::tr( "DAT_FILES_FILTER" ) + " (*.dat)" ); } - else if ( theCommandID == SMESHOp::OpImportSTL ) { + else if ( theCommandID == SMESHOp::OpImportSTL || + theCommandID == SMESHOp::OpPopupImportSTL ) { filter.append( QObject::tr( "STL_FILES_FILTER" ) + " (*.stl)" ); } - #ifdef WITH_CGNS - else if ( theCommandID == SMESHOp::OpImportCGNS ) { + else if ( theCommandID == SMESHOp::OpImportCGNS || + theCommandID == SMESHOp::OpPopupImportCGNS ) { filter.append( QObject::tr( "CGNS_FILES_FILTER" ) + " (*.cgns)" ); } - #endif - else if ( theCommandID == SMESHOp::OpImportSAUV ) { + else if ( theCommandID == SMESHOp::OpImportSAUV || + theCommandID == SMESHOp::OpPopupImportSAUV ) { filter.append( QObject::tr( "SAUV files (*.sauv*)" ) ); filter.append( QObject::tr( "All files (*)" ) ); } - else if ( theCommandID == SMESHOp::OpImportGMF ) { + else if ( theCommandID == SMESHOp::OpImportGMF || + theCommandID == SMESHOp::OpPopupImportGMF ) { filter.append( QObject::tr( "GMF_ASCII_FILES_FILTER" ) + " (*.mesh)" ); filter.append( QObject::tr( "GMF_BINARY_FILES_FILTER") + " (*.meshb)" ); } @@ -283,6 +288,7 @@ namespace try { switch ( theCommandID ) { case SMESHOp::OpImportDAT: + case SMESHOp::OpPopupImportDAT: { // DAT format (currently unsupported) errors.append( QString( "%1 :\n\t%2" ).arg( filename ). @@ -290,6 +296,7 @@ namespace break; } case SMESHOp::OpImportUNV: + case SMESHOp::OpPopupImportUNV: { // UNV format aMeshes->length( 1 ); @@ -300,6 +307,7 @@ namespace break; } case SMESHOp::OpImportMED: + case SMESHOp::OpPopupImportMED: { // MED format SMESH::DriverMED_ReadStatus res; @@ -311,6 +319,7 @@ namespace break; } case SMESHOp::OpImportSTL: + case SMESHOp::OpPopupImportSTL: { // STL format aMeshes->length( 1 ); @@ -321,8 +330,8 @@ namespace } break; } - #ifdef WITH_CGNS case SMESHOp::OpImportCGNS: + case SMESHOp::OpPopupImportCGNS: { // CGNS format SMESH::DriverMED_ReadStatus res; @@ -333,8 +342,8 @@ namespace } break; } - #endif case SMESHOp::OpImportSAUV: + case SMESHOp::OpPopupImportSAUV: { // SAUV format SMESH::DriverMED_ReadStatus res; @@ -346,6 +355,7 @@ namespace break; } case SMESHOp::OpImportGMF: + case SMESHOp::OpPopupImportGMF: { // GMF format SMESH::ComputeError_var res; @@ -433,12 +443,8 @@ namespace theCommandID == SMESHOp::OpPopupExportUNV ); const bool isSTL = ( theCommandID == SMESHOp::OpExportSTL || theCommandID == SMESHOp::OpPopupExportSTL ); -#ifdef WITH_CGNS const bool isCGNS= ( theCommandID == SMESHOp::OpExportCGNS || theCommandID == SMESHOp::OpPopupExportCGNS ); -#else - const bool isCGNS= false; -#endif const bool isSAUV= ( theCommandID == SMESHOp::OpExportSAUV || theCommandID == SMESHOp::OpPopupExportSAUV ); const bool isGMF = ( theCommandID == SMESHOp::OpExportGMF || @@ -467,10 +473,14 @@ namespace QObject::tr( "SMESH_BAD_MESH_SELECTION" )); return; } - SMESH::SMESH_GroupBase_var aGroup = SMESH::SMESH_GroupBase::_narrow( aMeshItem ); - if ( aCheckWarn && !aGroup->_is_nil() ) { - QMessageBox msgBox(SUIT_MessageBox::Warning,QObject::tr("SMESH_WRN_WARNING"), - QObject::tr("SMESH_EXPORT_ONLY_GPOUP"),QMessageBox::StandardButton::NoButton, SMESHGUI::desktop()); + SMESH::SMESH_GroupBase_var aGroup = SMESH::SMESH_GroupBase::_narrow( aMeshItem ); + if ( aCheckWarn && !aGroup->_is_nil() ) + { + QMessageBox msgBox(SUIT_MessageBox::Warning, + QObject::tr("SMESH_WRN_WARNING"), + QObject::tr("SMESH_EXPORT_ONLY_GPOUP"), + QMessageBox::StandardButton::NoButton, + SMESHGUI::desktop()); QCheckBox dontShowCheckBox(QObject::tr("SMESH_WRN_SHOW_DLG_CHECKBOX")); msgBox.addButton(QMessageBox::Ok); msgBox.addButton(QMessageBox::Cancel); @@ -481,12 +491,12 @@ namespace lt->addWidget(btnbox, lt->rowCount(), 0, lt->rowCount(), lt->columnCount()); if(msgBox.exec() == QMessageBox::Ok) { - if(dontShowCheckBox.checkState() == Qt::Checked) - { - if ( resMgr ) - resMgr->setValue( "SMESH", "show_warning", false); - } - aCheckWarn = false; + if(dontShowCheckBox.checkState() == Qt::Checked) + { + if ( resMgr ) + resMgr->setValue( "SMESH", "show_warning", false); + } + aCheckWarn = false; } else return; @@ -975,6 +985,7 @@ namespace aSel->selectedObjects( selected ); if ( selected.Extent() >= 1 ) { + SUIT_OverrideCursor wc; SALOME_ListIteratorOfListIO It( selected ); for( ; It.More(); It.Next()){ Handle(SALOME_InteractiveObject) IObject = It.Value(); @@ -1595,6 +1606,7 @@ namespace return; } // case SMESHOp::OpProperties: } // switch(theCommandID) + SUIT_OverrideCursor wc; SALOME_ListIteratorOfListIO It( selected ); for( ; It.More(); It.Next()){ Handle(SALOME_InteractiveObject) IObject = It.Value(); @@ -1818,20 +1830,24 @@ void SMESHGUI::OnEditDelete() int objectCount = 0; QString aNameList; QString aParentComponent = QString::null; - Handle(SALOME_InteractiveObject) anIO; + for( SALOME_ListIteratorOfListIO anIt( selected ); anIt.More(); anIt.Next() ) { - anIO = anIt.Value(); - QString cur = anIO->getComponentDataType(); - _PTR(SObject) aSO = aStudy->FindObjectID(anIO->getEntry()); + Handle(SALOME_InteractiveObject) anIO = anIt.Value(); + if ( anIO.IsNull() ) continue; + + QString father = "unknown"; + + _PTR(SObject) aSO = aStudy->FindObjectID( anIO->getEntry() ); if (aSO) { + father = QString::fromStdString( aSO->GetFatherComponent()->ComponentDataType() ); // check if object is reference _PTR(SObject) aRefSObj; aNameList.append("\n - "); if ( aSO->ReferencedObject( aRefSObj ) ) { QString aRefName = QString::fromStdString ( aRefSObj->GetName() ); aNameList.append( aRefName ); - cur = QString::fromStdString ( aRefSObj->GetFatherComponent()->ComponentDataType() ); + father = QString::fromStdString ( aRefSObj->GetFatherComponent()->ComponentDataType() ); } else aNameList.append(anIO->getName()); @@ -1839,8 +1855,8 @@ void SMESHGUI::OnEditDelete() } if( aParentComponent.isNull() ) - aParentComponent = cur; - else if( !aParentComponent.isEmpty() && aParentComponent!=cur ) + aParentComponent = father; + else if( !aParentComponent.isEmpty() && aParentComponent!=father ) aParentComponent = ""; } @@ -2445,11 +2461,16 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) case SMESHOp::OpImportUNV: case SMESHOp::OpImportMED: case SMESHOp::OpImportSTL: -#ifdef WITH_CGNS case SMESHOp::OpImportCGNS: -#endif case SMESHOp::OpImportSAUV: case SMESHOp::OpImportGMF: + case SMESHOp::OpPopupImportDAT: + case SMESHOp::OpPopupImportUNV: + case SMESHOp::OpPopupImportMED: + case SMESHOp::OpPopupImportSTL: + case SMESHOp::OpPopupImportCGNS: + case SMESHOp::OpPopupImportSAUV: + case SMESHOp::OpPopupImportGMF: { if(checkLock(aStudy)) break; ::ImportMeshesFromFile(GetSMESHGen(),theCommandID); @@ -2478,18 +2499,14 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) case SMESHOp::OpExportMED: case SMESHOp::OpExportUNV: case SMESHOp::OpExportSTL: -#ifdef WITH_CGNS case SMESHOp::OpExportCGNS: -#endif case SMESHOp::OpExportSAUV: case SMESHOp::OpExportGMF: case SMESHOp::OpPopupExportDAT: case SMESHOp::OpPopupExportMED: case SMESHOp::OpPopupExportUNV: case SMESHOp::OpPopupExportSTL: -#ifdef WITH_CGNS case SMESHOp::OpPopupExportCGNS: -#endif case SMESHOp::OpPopupExportSAUV: case SMESHOp::OpPopupExportGMF: { @@ -2599,6 +2616,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) case SMESHOp::OpOrientationOnFaces: { + SUIT_OverrideCursor wc; LightApp_SelectionMgr* mgr = selectionMgr(); SALOME_ListIO selected; mgr->selectedObjects( selected ); @@ -2664,9 +2682,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) extractContainers( sel_objects, to_process ); try { -#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 OCC_CATCH_SIGNALS; -#endif if (vtkwnd) { SALOME_ListIteratorOfListIO It( to_process ); for ( ; It.More(); It.Next()) @@ -3352,12 +3368,12 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) for ( ; It.More(); It.Next() ) { Handle(SALOME_InteractiveObject) IOS = It.Value(); - SMESH::SMESH_Mesh_var aMesh = - SMESH::IObjectToInterface(IOS); + SMESH::SMESH_Mesh_var aMesh = SMESH::IObjectToInterface(IOS); if ( aMesh->_is_nil()) continue; try { - SMESH::RemoveVisualObjectWithActors(IOS->getEntry(), true); aMesh->Clear(); + if ( aMesh->NbNodes() == 0 ) // imported mesh is not empty + SMESH::RemoveVisualObjectWithActors(IOS->getEntry(), true); _PTR(SObject) aMeshSObj = SMESH::FindSObject(aMesh); SMESH::ModifiedMesh( aMeshSObj, false, true); // hide groups and submeshes @@ -3814,13 +3830,21 @@ void SMESHGUI::initialize( CAM_Application* app ) //createSMESHAction( SMESHOp::OpImportDAT, "IMPORT_DAT", "", (Qt::CTRL+Qt::Key_B) ); createSMESHAction( SMESHOp::OpImportUNV, "IMPORT_UNV", "", (Qt::CTRL+Qt::Key_I) ); createSMESHAction( SMESHOp::OpImportMED, "IMPORT_MED", "", (Qt::CTRL+Qt::Key_M) ); - //createSMESHAction( 114, "NUM" ); createSMESHAction( SMESHOp::OpImportSTL, "IMPORT_STL" ); #ifdef WITH_CGNS createSMESHAction( SMESHOp::OpImportCGNS, "IMPORT_CGNS" ); #endif createSMESHAction( SMESHOp::OpImportSAUV, "IMPORT_SAUV" ); createSMESHAction( SMESHOp::OpImportGMF, "IMPORT_GMF" ); + createSMESHAction( SMESHOp::OpPopupImportUNV, "IMPORT_UNV"); + createSMESHAction( SMESHOp::OpPopupImportMED, "IMPORT_MED"); + createSMESHAction( SMESHOp::OpPopupImportSTL, "IMPORT_STL" ); +#ifdef WITH_CGNS + createSMESHAction( SMESHOp::OpPopupImportCGNS, "IMPORT_CGNS" ); +#endif + createSMESHAction( SMESHOp::OpPopupImportSAUV, "IMPORT_SAUV" ); + createSMESHAction( SMESHOp::OpPopupImportGMF, "IMPORT_GMF" ); + createSMESHAction( SMESHOp::OpExportDAT, "DAT" ); createSMESHAction( SMESHOp::OpExportMED, "MED" ); createSMESHAction( SMESHOp::OpExportUNV, "UNV" ); @@ -3850,7 +3874,7 @@ void SMESHGUI::initialize( CAM_Application* app ) createSMESHAction( SMESHOp::OpBuildCompoundMesh, "BUILD_COMPOUND", "ICON_BUILD_COMPOUND" ); createSMESHAction( SMESHOp::OpCopyMesh, "COPY_MESH", "ICON_COPY_MESH" ); createSMESHAction( SMESHOp::OpCompute, "COMPUTE", "ICON_COMPUTE" ); - createSMESHAction( SMESHOp::OpComputeSubMesh, "COMPUTE_SUBMESH", "ICON_COMPUTE" ); + createSMESHAction( SMESHOp::OpComputeSubMesh, "COMPUTE_SUBMESH", "ICON_COMPUTE" ); createSMESHAction( SMESHOp::OpPreCompute, "PRECOMPUTE", "ICON_PRECOMPUTE" ); createSMESHAction( SMESHOp::OpEvaluate, "EVALUATE", "ICON_EVALUATE" ); createSMESHAction( SMESHOp::OpMeshOrder, "MESH_ORDER", "ICON_MESH_ORDER"); @@ -3863,8 +3887,8 @@ void SMESHGUI::initialize( CAM_Application* app ) createSMESHAction( SMESHOp::OpIntersectGroups, "INT_GROUP", "ICON_INTERSECT" ); createSMESHAction( SMESHOp::OpCutGroups, "CUT_GROUP", "ICON_CUT" ); createSMESHAction( SMESHOp::OpGroupUnderlyingElem, "UNDERLYING_ELEMS", "ICON_UNDERLYING_ELEMS" ); - createSMESHAction( SMESHOp::OpAddElemGroupPopup, "ADD" ); - createSMESHAction( SMESHOp::OpRemoveElemGroupPopup, "REMOVE" ); + createSMESHAction( SMESHOp::OpAddElemGroupPopup, "ADD_TO_GROUP" ); + createSMESHAction( SMESHOp::OpRemoveElemGroupPopup, "REMOVE_FROM_GROUP" ); createSMESHAction( SMESHOp::OpDeleteGroup, "DEL_GROUP", "ICON_DEL_GROUP" ); createSMESHAction( SMESHOp::OpMeshInformation , "ADV_INFO", "ICON_ADV_INFO" ); //createSMESHAction( SMESHOp::OpStdInfo, "STD_INFO", "ICON_STD_INFO" ); @@ -3898,7 +3922,7 @@ void SMESHGUI::initialize( CAM_Application* app ) createSMESHAction( SMESHOp::OpBareBorderVolume, "BARE_BORDER_VOLUME", "ICON_BARE_BORDER_VOLUME", 0, true ); createSMESHAction( SMESHOp::OpOverConstrainedVolume, "OVER_CONSTRAINED_VOLUME", "ICON_OVER_CONSTRAINED_VOLUME", 0, true ); createSMESHAction( SMESHOp::OpEqualVolume, "EQUAL_VOLUME", "ICON_EQUAL_VOLUME", 0, true ); - createSMESHAction( SMESHOp::OpOverallMeshQuality, "OVERALL_MESH_QUALITY" ); + createSMESHAction( SMESHOp::OpOverallMeshQuality, "OVERALL_MESH_QUALITY", "ICON_OVL_MESH_QUALITY" ); createSMESHAction( SMESHOp::OpNode, "NODE", "ICON_DLG_NODE" ); createSMESHAction( SMESHOp::OpElem0D, "ELEM0D", "ICON_DLG_ELEM0D" ); @@ -4000,8 +4024,8 @@ void SMESHGUI::initialize( CAM_Application* app ) createSMESHAction( SMESHOp::OpPropertiesArea, "MEASURE_AREA", "ICON_MEASURE_AREA" ); createSMESHAction( SMESHOp::OpPropertiesVolume, "MEASURE_VOLUME", "ICON_MEASURE_VOLUME" ); - createSMESHAction( SMESHOp::OpHide, "HIDE" ); - createSMESHAction( SMESHOp::OpShow, "SHOW" ); + createSMESHAction( SMESHOp::OpHide, "HIDE", "ICON_HIDE" ); + createSMESHAction( SMESHOp::OpShow, "SHOW", "ICON_SHOW" ); createSMESHAction( SMESHOp::OpShowOnly, "DISPLAY_ONLY" ); createSMESHAction( SMESHOp::OpSortChild, "SORT_CHILD_ITEMS" ); @@ -4357,6 +4381,7 @@ void SMESHGUI::initialize( CAM_Application* app ) group = pat.arg( SMESHGUI_Selection::typeName( SMESH::GROUP ) ), hypo = pat.arg( SMESHGUI_Selection::typeName( SMESH::HYPOTHESIS ) ), algo = pat.arg( SMESHGUI_Selection::typeName( SMESH::ALGORITHM ) ), + smesh = pat.arg( SMESHGUI_Selection::typeName( SMESH::COMPONENT ) ), elems = QString( "'%1' '%2' '%3' '%4' '%5' '%6'" ). arg( SMESHGUI_Selection::typeName( SMESH::SUBMESH_VERTEX ) ). arg( SMESHGUI_Selection::typeName( SMESH::SUBMESH_EDGE ) ). @@ -4377,9 +4402,10 @@ void SMESHGUI::initialize( CAM_Application* app ) isNotEmpty("numberOfNodes <> 0"), // has nodes, edges, etc in VISIBLE! actor - hasNodes("(numberOfNodes > 0 )"),//&& isVisible)"), + hasNodes("(numberOfNodes > 0 ) && hasActor"), hasElems("(count( elemTypes ) > 0)"), hasDifferentElems("(count( elemTypes ) > 1)"), + hasDifferentObjElems("(count( objElemTypes ) > 1)"), hasBalls("({'BallElem'} in elemTypes)"), hasElems0d("({'Elem0d'} in elemTypes)"), hasEdges("({'Edge'} in elemTypes)"), @@ -4434,12 +4460,23 @@ void SMESHGUI::initialize( CAM_Application* app ) createPopupItem( SMESHOp::OpPopupExportDAT, OB, mesh_group, only_one_non_empty, anId ); createPopupItem( SMESHOp::OpDelete, OB, mesh_part + " " + hyp_alg ); createPopupItem( SMESHOp::OpDeleteGroup, OB, group ); + + anId = popupMgr()->insert( tr( "MEN_IMPORT" ), -1, -1 ); // IMPORT submenu + createPopupItem( SMESHOp::OpPopupImportMED, OB, smesh, "", anId ); + createPopupItem( SMESHOp::OpPopupImportUNV, OB, smesh, "", anId ); + createPopupItem( SMESHOp::OpPopupImportSTL, OB, smesh, "", anId ); +#ifdef WITH_CGNS + createPopupItem( SMESHOp::OpPopupImportCGNS, OB, smesh, "", anId ); +#endif + createPopupItem( SMESHOp::OpPopupImportSAUV, OB, smesh, "", anId ); + createPopupItem( SMESHOp::OpPopupImportGMF, OB, smesh, "", anId ); + createPopupItem( SMESHOp::OpPopupImportDAT, OB, smesh, "", anId ); popupMgr()->insert( separator(), -1, 0 ); // popup for viewer createPopupItem( SMESHOp::OpEditGroup, View, group ); - createPopupItem( SMESHOp::OpAddElemGroupPopup, View, elems ); - createPopupItem( SMESHOp::OpRemoveElemGroupPopup, View, elems ); + createPopupItem( SMESHOp::OpAddElemGroupPopup, View, elems, "&& guiState = 800" ); + createPopupItem( SMESHOp::OpRemoveElemGroupPopup, View, elems, "&& guiState = 800" ); popupMgr()->insert( separator(), -1, 0 ); createPopupItem( SMESHOp::OpUpdate, View, mesh_part ); @@ -4490,7 +4527,7 @@ void SMESHGUI::initialize( CAM_Application* app ) popupMgr()->setRule( action( SMESHOp::OpDMShading ), "displayMode = 'eSurface'", QtxPopupMgr::ToggleRule ); popupMgr()->insert( action( SMESHOp::OpDMNodes ), anId, -1 ); - popupMgr()->setRule( action( SMESHOp::OpDMNodes ), aMeshInVTK + "&&" + hasNodes, QtxPopupMgr::VisibleRule ); + popupMgr()->setRule( action( SMESHOp::OpDMNodes ), aMeshInVTK + "&&" + hasNodes + "&&" + hasElems, QtxPopupMgr::VisibleRule ); popupMgr()->setRule( action( SMESHOp::OpDMNodes ), "displayMode = 'ePoint'", QtxPopupMgr::ToggleRule ); popupMgr()->insert( separator(), anId, -1 ); @@ -4529,7 +4566,7 @@ void SMESHGUI::initialize( CAM_Application* app ) popupMgr()->insert( separator(), anId, -1 ); popupMgr()->insert( action( SMESHOp::OpDEChoose ), anId, -1 ); - popupMgr()->setRule( action( SMESHOp::OpDEChoose ), aClient + "&&" + aType + "&&" + isNotEmpty, QtxPopupMgr::VisibleRule ); + popupMgr()->setRule( action( SMESHOp::OpDEChoose ), aClient + "&& $type in {" + mesh + "} &&" + hasDifferentObjElems, QtxPopupMgr::VisibleRule ); popupMgr()->insert( separator(), anId, -1 ); @@ -4572,9 +4609,9 @@ void SMESHGUI::initialize( CAM_Application* app ) // Controls //------------------------------------------------- QString - aMeshInVtkHasNodes = aMeshInVTK + "&&" + hasNodes, - aMeshInVtkHasEdges = aMeshInVTK + "&&" + hasEdges, - aMeshInVtkHasFaces = aMeshInVTK + "&&" + hasFaces, + aMeshInVtkHasNodes = aMeshInVTK + "&&" + hasNodes, + aMeshInVtkHasEdges = aMeshInVTK + "&&" + hasEdges, + aMeshInVtkHasFaces = aMeshInVTK + "&&" + hasFaces, aMeshInVtkHasVolumes = aMeshInVTK + "&&" + hasVolumes; anId = popupMgr()->insert( tr( "MEN_CTRL" ), -1, -1 ); @@ -4998,19 +5035,6 @@ void SMESHGUI::createPreferences() setPreferenceProperty( lim, "special", tr( "PREF_UPDATE_LIMIT_NOLIMIT" ) ); addPreference( tr( "PREF_INCREMENTAL_LIMIT" ), autoUpdate, LightApp_Preferences::Bool, "SMESH", "incremental_limit" ); - int qaGroup = addPreference( tr( "PREF_GROUP_QUALITY" ), genTab ); - setPreferenceProperty( qaGroup, "columns", 2 ); - addPreference( tr( "PREF_DISPLAY_ENTITY" ), qaGroup, LightApp_Preferences::Bool, "SMESH", "display_entity" ); - addPreference( tr( "PREF_PRECISION_USE" ), qaGroup, LightApp_Preferences::Bool, "SMESH", "use_precision" ); - int prec = addPreference( tr( "PREF_PRECISION_VALUE" ), qaGroup, LightApp_Preferences::IntSpin, "SMESH", "controls_precision" ); - setPreferenceProperty( prec, "min", 0 ); - setPreferenceProperty( prec, "max", 100 ); - int doubleNodesTol = addPreference( tr( "PREF_EQUAL_NODES_TOL" ), qaGroup, LightApp_Preferences::DblSpin, "SMESH", "equal_nodes_tolerance" ); - setPreferenceProperty( doubleNodesTol, "precision", 10 ); - setPreferenceProperty( doubleNodesTol, "min", 0.0000000001 ); - setPreferenceProperty( doubleNodesTol, "max", 1000000.0 ); - setPreferenceProperty( doubleNodesTol, "step", 0.0000001 ); - int dispgroup = addPreference( tr( "PREF_DISPLAY_MODE_GROUP" ), genTab ); setPreferenceProperty( dispgroup, "columns", 2 ); int dispmode = addPreference( tr( "PREF_DISPLAY_MODE" ), dispgroup, LightApp_Preferences::Selector, "SMESH", "display_mode" ); @@ -5044,6 +5068,18 @@ void SMESHGUI::createPreferences() setPreferenceProperty( maxAngle, "min", 1 ); setPreferenceProperty( maxAngle, "max", 90 ); + int qaGroup = addPreference( tr( "PREF_GROUP_QUALITY" ), genTab ); + setPreferenceProperty( qaGroup, "columns", 2 ); + addPreference( tr( "PREF_DISPLAY_ENTITY" ), qaGroup, LightApp_Preferences::Bool, "SMESH", "display_entity" ); + addPreference( tr( "PREF_PRECISION_USE" ), qaGroup, LightApp_Preferences::Bool, "SMESH", "use_precision" ); + int prec = addPreference( tr( "PREF_PRECISION_VALUE" ), qaGroup, LightApp_Preferences::IntSpin, "SMESH", "controls_precision" ); + setPreferenceProperty( prec, "min", 0 ); + setPreferenceProperty( prec, "max", 100 ); + int doubleNodesTol = addPreference( tr( "PREF_EQUAL_NODES_TOL" ), qaGroup, LightApp_Preferences::DblSpin, "SMESH", "equal_nodes_tolerance" ); + setPreferenceProperty( doubleNodesTol, "precision", 10 ); + setPreferenceProperty( doubleNodesTol, "min", 0.0000000001 ); + setPreferenceProperty( doubleNodesTol, "max", 1000000.0 ); + setPreferenceProperty( doubleNodesTol, "step", 0.0000001 ); int exportgroup = addPreference( tr( "PREF_GROUP_EXPORT" ), genTab ); @@ -5481,7 +5517,7 @@ void SMESHGUI::update( const int flags ) /*! * \brief Set default selection mode * -* SLOT called when operation commited. Sets default selection mode +* SLOT called when operation committed. Sets default selection mode */ //================================================================================ void SMESHGUI::onOperationCommited( SUIT_Operation* ) @@ -5803,7 +5839,7 @@ void SMESHGUI::storeVisualParameters (int savePoint) Handle(SALOME_InteractiveObject) io = aSmeshActor->getIO(); if (io->hasEntry()) { - // entry is "encoded" = it does NOT contain component adress, + // entry is "encoded" = it does NOT contain component address, // since it is a subject to change on next component loading std::string entry = ip->encodeEntry(io->getEntry(), componentName); @@ -6204,7 +6240,7 @@ void SMESHGUI::restoreVisualParameters (int savePoint) for (std::vector::iterator entIt = entries.begin(); entIt != entries.end(); ++entIt) { - // entry is a normal entry - it should be "decoded" (setting base adress of component) + // entry is a normal entry - it should be "decoded" (setting base address of component) QString entry (ip->decodeEntry(*entIt).c_str()); // Check that the entry corresponds to a real object in the Study