-// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2019 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
#include <SMESHGUI_HypothesesUtils.h>
#include <SMESHGUI_Utils.h>
#include <SMESHGUI_GEOMGenUtils.h>
-
#include <SMESH_TypeFilter.hxx>
#include <SMESH_NumberFilter.hxx>
#include <GEOM_wrap.hxx>
// SALOME GUI includes
-#include <SUIT_ResourceMgr.h>
#include <SUIT_MessageBox.h>
+#include <SUIT_ResourceMgr.h>
+#include <SalomeApp_IntSpinBox.h>
// IDL includes
#include <SALOMEconfig.h>
//================================================================================
/*!
- * \brief Allow modifing myCustomWidgets in const methods
+ * \brief Allow modifying myCustomWidgets in const methods
* \retval ListOfWidgets* - non-const pointer to myCustomWidgets
*/
//================================================================================
GEOM::GEOM_Object_var face = w->GetObject< GEOM::GEOM_Object >();
GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen();
- _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
+ _PTR(Study) aStudy = SMESH::getStudy();
GEOM::GEOM_IShapesOperations_wrap shapeOp;
if ( !geomGen->_is_nil() && aStudy )
- shapeOp = geomGen->GetIShapesOperations( aStudy->StudyId() );
+ shapeOp = geomGen->GetIShapesOperations();
if ( !shapeOp->_is_nil() )
{
GEOM::ListOfLong_var vertices =
bool res = getStdParamFromDlg( params );
if( isCreation() )
{
- SMESH::SetName( SMESH::FindSObject( hypothesis() ), params[0].myValue.toString().toLatin1().data() );
+ SMESH::SetName( SMESH::FindSObject( hypothesis() ), params[0].myValue.toString().toUtf8().data() );
params.erase( params.begin() );
}
sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, "length_precision" );
}
}
+ else if ( SalomeApp_IntSpinBox* sb = qobject_cast< SalomeApp_IntSpinBox* >( w ))
+ {
+ if ( hypType().startsWith( "NumberOfLayers" ) ||
+ hypType().startsWith( "ViscousLayers" ))
+ {
+ sb->setMinimum( 1 );
+ }
+ }
}
//================================================================================
//================================================================================
/*!
* \brief String to insert in "SMESH_%1_HYPOTHESIS" to get hypothesis type name
- * from message resouce file
+ * from message resource file
* \param t - hypothesis type
* \retval QString - result string
*/