mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-27 09:50:34 +05:00
Fix regression
This commit is contained in:
parent
57d4d5c456
commit
c51eaff3b2
@ -629,14 +629,16 @@ void SMESH_ActorDef::SetControlMode(eControl theMode){
|
|||||||
my3DActor->GetMapper()->SetScalarVisibility(false);
|
my3DActor->GetMapper()->SetScalarVisibility(false);
|
||||||
myScalarBarActor->SetVisibility(false);
|
myScalarBarActor->SetVisibility(false);
|
||||||
|
|
||||||
if(theMode != eNone){
|
bool anIsScalarVisible = theMode > eNone;
|
||||||
|
|
||||||
|
if(anIsScalarVisible){
|
||||||
SMESH::Controls::FunctorPtr aFunctor;
|
SMESH::Controls::FunctorPtr aFunctor;
|
||||||
SMESH::Controls::NumericalFunctor* aNumFunctor = NULL;
|
|
||||||
switch(theMode){
|
switch(theMode){
|
||||||
case eLength:
|
case eLength:
|
||||||
{
|
{
|
||||||
aNumFunctor = new SMESH::Controls::Length();
|
SMESH::Controls::Length* aControl = new SMESH::Controls::Length();
|
||||||
aFunctor.reset( aNumFunctor );
|
aControl->SetPrecision( myControlsPrecision );
|
||||||
|
aFunctor.reset( aControl );
|
||||||
myControlActor = my1DActor;
|
myControlActor = my1DActor;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -660,50 +662,57 @@ void SMESH_ActorDef::SetControlMode(eControl theMode){
|
|||||||
break;
|
break;
|
||||||
case eArea:
|
case eArea:
|
||||||
{
|
{
|
||||||
aNumFunctor = new SMESH::Controls::Area();
|
SMESH::Controls::Area* aControl = new SMESH::Controls::Area();
|
||||||
aFunctor.reset( aNumFunctor );
|
aControl->SetPrecision( myControlsPrecision );
|
||||||
|
aFunctor.reset( aControl );
|
||||||
myControlActor = my2DActor;
|
myControlActor = my2DActor;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case eTaper:
|
case eTaper:
|
||||||
{
|
{
|
||||||
aNumFunctor = new SMESH::Controls::Taper();
|
SMESH::Controls::Taper* aControl = new SMESH::Controls::Taper();
|
||||||
aFunctor.reset( aNumFunctor );
|
aControl->SetPrecision( myControlsPrecision );
|
||||||
|
aFunctor.reset( aControl );
|
||||||
myControlActor = my2DActor;
|
myControlActor = my2DActor;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case eAspectRatio:
|
case eAspectRatio:
|
||||||
{
|
{
|
||||||
aNumFunctor = new SMESH::Controls::AspectRatio();
|
SMESH::Controls::AspectRatio* aControl = new SMESH::Controls::AspectRatio();
|
||||||
aFunctor.reset( aNumFunctor );
|
aControl->SetPrecision( myControlsPrecision );
|
||||||
|
aFunctor.reset( aControl );
|
||||||
myControlActor = my2DActor;
|
myControlActor = my2DActor;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case eAspectRatio3D:
|
case eAspectRatio3D:
|
||||||
{
|
{
|
||||||
aNumFunctor = new SMESH::Controls::AspectRatio3D();
|
SMESH::Controls::AspectRatio3D* aControl = new SMESH::Controls::AspectRatio3D();
|
||||||
aFunctor.reset( aNumFunctor );
|
aControl->SetPrecision( myControlsPrecision );
|
||||||
|
aFunctor.reset( aControl );
|
||||||
myControlActor = my3DActor;
|
myControlActor = my3DActor;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case eMinimumAngle:
|
case eMinimumAngle:
|
||||||
{
|
{
|
||||||
aNumFunctor = new SMESH::Controls::MinimumAngle();
|
SMESH::Controls::MinimumAngle* aControl = new SMESH::Controls::MinimumAngle();
|
||||||
aFunctor.reset( aNumFunctor );
|
aControl->SetPrecision( myControlsPrecision );
|
||||||
|
aFunctor.reset( aControl );
|
||||||
myControlActor = my2DActor;
|
myControlActor = my2DActor;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case eWarping:
|
case eWarping:
|
||||||
{
|
{
|
||||||
aNumFunctor = new SMESH::Controls::Warping();
|
SMESH::Controls::Warping* aControl = new SMESH::Controls::Warping();
|
||||||
aFunctor.reset( aNumFunctor );
|
aControl->SetPrecision( myControlsPrecision );
|
||||||
|
aFunctor.reset( aControl );
|
||||||
myControlActor = my2DActor;
|
myControlActor = my2DActor;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case eSkew:
|
case eSkew:
|
||||||
{
|
{
|
||||||
aNumFunctor = new SMESH::Controls::Skew();
|
SMESH::Controls::Skew* aControl = new SMESH::Controls::Skew();
|
||||||
aFunctor.reset( aNumFunctor );
|
aControl->SetPrecision( myControlsPrecision );
|
||||||
|
aFunctor.reset( aControl );
|
||||||
myControlActor = my2DActor;
|
myControlActor = my2DActor;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -711,9 +720,6 @@ void SMESH_ActorDef::SetControlMode(eControl theMode){
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(aNumFunctor)
|
|
||||||
aNumFunctor->SetPrecision( myControlsPrecision );
|
|
||||||
|
|
||||||
vtkUnstructuredGrid* aGrid = myControlActor->GetUnstructuredGrid();
|
vtkUnstructuredGrid* aGrid = myControlActor->GetUnstructuredGrid();
|
||||||
vtkIdType aNbCells = aGrid->GetNumberOfCells();
|
vtkIdType aNbCells = aGrid->GetNumberOfCells();
|
||||||
if(aNbCells){
|
if(aNbCells){
|
||||||
|
Loading…
Reference in New Issue
Block a user