]> SALOME platform Git repositories - plugins/blsurfplugin.git/commitdiff
Salome HOME
23174: EDF 11564 - gradation available when create a new hypothesis
authoreap <eap@opencascade.com>
Wed, 30 Sep 2015 16:53:49 +0000 (19:53 +0300)
committereap <eap@opencascade.com>
Wed, 30 Sep 2015 16:53:49 +0000 (19:53 +0300)
src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx
src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx
src/GUI/BLSURFPluginGUI_StdWidget.cxx

index d8e01c30b456a1dde8e6bd806e74c92d9e04b4fd..416e95f7800c49d0af72db6d458a545668d25b6b 100644 (file)
@@ -2802,7 +2802,7 @@ bool BLSURFPlugin_BLSURF::compute(SMESH_Mesh&         aMesh,
     if (!asciiFound && !binaryFound)
       GMFFileName.append(".mesh");
     mesh_write_mesh(msh, GMFFileName.c_str());
-    cout << GMFFileName << " created = " << SMESH_File(GMFFileName).exists() << endl;
+    //cout << GMFFileName << " created = " << SMESH_File(GMFFileName).exists() << endl;
   }
 
   /* retrieve mesh data (see meshgems/mesh.h) */
index fc6f957da7d6881cb2c0d857fbe28e12a190e852..c178094932f9fdb6622bbe4e198b8ba36ec5bb5e 100644 (file)
@@ -1184,12 +1184,12 @@ This method stop the selection of the widgets StdMeshersGUI_ObjectReferenceParam
 
 void BLSURFPluginGUI_HypothesisCreator::onStateChange()
 {
-  myStdWidget->myGradation->setEnabled( !myStdWidget->myAllowQuadrangles->isChecked() );
+  myStdWidget->onPhysicalMeshChanged();
 }
 
-/** 
+/**
  * This method resets the content of the X, Y, Z widgets;
-**/
+ **/
 void BLSURFPluginGUI_HypothesisCreator::clearEnforcedVertexWidgets()
 {
   myXCoord->setCleared(true);
index 64df98ab40a373dc14f1bf505258a6c73f2c112f..6dff729b2d2219b49077b3844d908b92e04f9234 100644 (file)
@@ -64,11 +64,12 @@ BLSURFPluginGUI_StdWidget::~BLSURFPluginGUI_StdWidget()
 
 void BLSURFPluginGUI_StdWidget::onPhysicalMeshChanged() {
   bool isPhysicalGlobalSize = (myPhysicalMesh->currentIndex() == PhysicalGlobalSize);
-  bool isPhysicalLocalSize = (myPhysicalMesh->currentIndex() == PhysicalLocalSize);
-  bool isCustom = (isPhysicalGlobalSize || isPhysicalLocalSize) ;
-  bool geomIsCustom = (myGeometricMesh->currentIndex() != DefaultGeom);
+  bool isPhysicalLocalSize  = (myPhysicalMesh->currentIndex() == PhysicalLocalSize);
+  bool isCustom             = (isPhysicalGlobalSize || isPhysicalLocalSize) ;
+  bool geomIsCustom         = (myGeometricMesh->currentIndex() != DefaultGeom);
+  bool isQuadAllowed        = (myAllowQuadrangles->isChecked() );
 
-  myGradation->setEnabled(!isPhysicalGlobalSize || geomIsCustom);
+  myGradation->setEnabled( !isQuadAllowed && ( !isPhysicalGlobalSize || geomIsCustom ));
   myPhySize->setEnabled(isCustom);
   myPhySizeRel->setEnabled(isCustom);
 
@@ -81,11 +82,12 @@ void BLSURFPluginGUI_StdWidget::onPhysicalMeshChanged() {
 }
 
 void BLSURFPluginGUI_StdWidget::onGeometricMeshChanged() {
-  bool isCustom = (myGeometricMesh->currentIndex() != DefaultGeom);
+  bool isCustom            = (myGeometricMesh->currentIndex() != DefaultGeom);
   bool isPhysicalLocalSize = (myPhysicalMesh->currentIndex() == PhysicalLocalSize);
+  bool isQuadAllowed       = (myAllowQuadrangles->isChecked() );
 
   GeomParamsGroupBox->setEnabled(isCustom);
-  myGradation->setEnabled(isCustom || isPhysicalLocalSize);
+  myGradation->setEnabled( !isQuadAllowed && ( isCustom || isPhysicalLocalSize ));
 
   if ( ! isCustom ) {
     //  hphy_flag = 0 and hgeo_flag = 0 is not allowed (spec)