From: eap Date: Wed, 30 Sep 2015 16:53:49 +0000 (+0300) Subject: 23174: EDF 11564 - gradation available when create a new hypothesis X-Git-Tag: V7_7_0_WIN~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7be28bcbe5de45588b77dc6f1f2e3eea69c6e7ca;p=plugins%2Fblsurfplugin.git 23174: EDF 11564 - gradation available when create a new hypothesis --- diff --git a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx index d8e01c3..416e95f 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx +++ b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx @@ -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) */ diff --git a/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx b/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx index fc6f957..c178094 100644 --- a/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx +++ b/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx @@ -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); diff --git a/src/GUI/BLSURFPluginGUI_StdWidget.cxx b/src/GUI/BLSURFPluginGUI_StdWidget.cxx index 64df98a..6dff729 100644 --- a/src/GUI/BLSURFPluginGUI_StdWidget.cxx +++ b/src/GUI/BLSURFPluginGUI_StdWidget.cxx @@ -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)