From: eap Date: Tue, 18 Dec 2012 11:31:22 +0000 (+0000) Subject: 22015: [CEA 734] "Relative value" disappear at hypothesis edition X-Git-Tag: V6_main_FINAL~18 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a6b1d55f6a38331fdf1708d9a586c283c2b905a3;p=plugins%2Fblsurfplugin.git 22015: [CEA 734] "Relative value" disappear at hypothesis edition --- diff --git a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.cxx b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.cxx index ca776fa..b96cd4b 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.cxx +++ b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.cxx @@ -179,7 +179,7 @@ CORBA::Boolean BLSURFPlugin_Hypothesis_i::IsPhySizeRel() { //============================================================================= void BLSURFPlugin_Hypothesis_i::SetMinSize(CORBA::Double theMinSize) { ASSERT(myBaseImpl); - if (GetMinSize() != theMinSize) { + if (IsMinSizeRel() || GetMinSize() != theMinSize ) { this->GetImpl()->SetMinSize(theMinSize, false); SMESH::TPythonDump() << _this() << ".SetMinSize( " << theMinSize << " )"; } @@ -188,7 +188,7 @@ void BLSURFPlugin_Hypothesis_i::SetMinSize(CORBA::Double theMinSize) { //============================================================================= void BLSURFPlugin_Hypothesis_i::SetMinSizeRel(CORBA::Double theMinSize) { ASSERT(myBaseImpl); - if ( IsMinSizeRel() && (GetMinSize() != theMinSize) ) { + if ( !IsMinSizeRel() && (GetMinSize() != theMinSize) ) { this->GetImpl()->SetMinSize(theMinSize, true); SMESH::TPythonDump() << _this() << ".SetMinSize( " << theMinSize << ", isRelative = True )"; } @@ -210,7 +210,7 @@ CORBA::Boolean BLSURFPlugin_Hypothesis_i::IsMinSizeRel() { //============================================================================= void BLSURFPlugin_Hypothesis_i::SetMaxSize(CORBA::Double theMaxSize) { ASSERT(myBaseImpl); - if (GetMaxSize() != theMaxSize) { + if (IsMaxSizeRel() || GetMaxSize() != theMaxSize) { this->GetImpl()->SetMaxSize(theMaxSize, false); SMESH::TPythonDump() << _this() << ".SetMaxSize( " << theMaxSize << " )"; } @@ -219,7 +219,7 @@ void BLSURFPlugin_Hypothesis_i::SetMaxSize(CORBA::Double theMaxSize) { //============================================================================= void BLSURFPlugin_Hypothesis_i::SetMaxSizeRel(CORBA::Double theMaxSize) { ASSERT(myBaseImpl); - if ( IsMaxSizeRel() && (GetMaxSize() != theMaxSize) ) { + if ( !IsMaxSizeRel() && (GetMaxSize() != theMaxSize) ) { this->GetImpl()->SetMaxSize(theMaxSize, true); SMESH::TPythonDump() << _this() << ".SetMaxSize( " << theMaxSize << ", isRelative = True )"; } diff --git a/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx b/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx index 8ab1ca5..a4db08b 100644 --- a/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx +++ b/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx @@ -1680,20 +1680,23 @@ bool BLSURFPluginGUI_HypothesisCreator::storeParamsToHypo( const BlsurfHypothesi h->SetGeometricMesh( (int) h_data.myGeometricMesh ); if ( ((int) h_data.myPhysicalMesh == PhysicalGlobalSize)||((int) h_data.myPhysicalMesh == PhysicalLocalSize) ) { - if ( h->GetPhySize() != h_data.myPhySize ) { + if ( h->GetPhySize() != h_data.myPhySize || + h->IsPhySizeRel() != h_data.myPhySizeRel ) { if ( h_data.myPhySizeRel ) h->SetPhySizeRel( h_data.myPhySize ); else h->SetPhySize( h_data.myPhySize ); } } - if (h->GetMinSize() != h_data.myMinSize) { + if (h->GetMinSize() != h_data.myMinSize || + h->IsMinSizeRel() != h_data.myMinSizeRel ) { if ( h_data.myMinSizeRel ) h->SetMinSizeRel( h_data.myMinSize <= 0 ? -1 : h_data.myMinSize ); else h->SetMinSize( h_data.myMinSize <= 0 ? -1 : h_data.myMinSize ); } - if (h->GetMaxSize() != h_data.myMaxSize) { + if (h->GetMaxSize() != h_data.myMaxSize || + h->IsMaxSizeRel() != h_data.myMaxSizeRel ) { if ( h_data.myMaxSizeRel ) h->SetMaxSizeRel( h_data.myMaxSize <= 0 ? -1 : h_data.myMaxSize ); else