*/
void SMESHGUI_ClippingDlg::setDistance( const double theDistance )
{
- SpinSliderDistance->setValue( theDistance*100 );
+ SpinSliderDistance->setValue( theDistance );
}
/*!
else if( theItem->checkState() == Qt::Unchecked && anIsPushed )
anActorList.remove( anActor );
- SMESH::ComputeBounds( anActorList, myBounds );
- myPreviewWidget->PlaceWidget( myBounds[0], myBounds[1], myBounds[2],
- myBounds[3], myBounds[4], myBounds[5] );
+ if( SMESH::ComputeBounds( anActorList, myBounds ) ) {
+ myPreviewWidget->On();
+ myPreviewWidget->PlaceWidget( myBounds[0], myBounds[1], myBounds[2],
+ myBounds[3], myBounds[4], myBounds[5] );
+ }
+ else
+ myPreviewWidget->Off();
}
}
}
bool anIsBlocked = ActorList->blockSignals( true );
- SMESH::ComputeBounds( anActorList, myBounds );
- myPreviewWidget->PlaceWidget( myBounds[0],myBounds[1],myBounds[2],
- myBounds[3],myBounds[4],myBounds[5] );
+ if( SMESH::ComputeBounds( anActorList, myBounds ) ) {
+ myPreviewWidget->On();
+ myPreviewWidget->PlaceWidget( myBounds[0], myBounds[1], myBounds[2],
+ myBounds[3], myBounds[4], myBounds[5] );
+ }
+ else
+ myPreviewWidget->Off();
+
synchronize();
SetCurrentPlaneParam();
}
}
myIsSelectPlane = false;
- SMESH::ComputeBounds( aPlaneData.ActorList, myBounds );
- myPreviewWidget->PlaceWidget( myBounds[0], myBounds[1], myBounds[2],
- myBounds[3], myBounds[4], myBounds[5] );
+
+ if( SMESH::ComputeBounds( aPlaneData.ActorList, myBounds ) ) {
+ myPreviewWidget->On();
+ myPreviewWidget->PlaceWidget( myBounds[0], myBounds[1], myBounds[2],
+ myBounds[3], myBounds[4], myBounds[5] );
+ }
+ else
+ myPreviewWidget->Off();
+
SetCurrentPlaneParam();
// Actors
aClippingPlaneInfoList.push_back( aClippingPlaneInfo );
}
- SMESH_Actor* anSMESHActor;
anAllActors->InitTraversal();
while( vtkActor* aVTKActor = anAllActors->GetNextActor() )
if( SMESH_Actor* anActor = SMESH_Actor::SafeDownCast( aVTKActor ) ) {
- anSMESHActor = anActor;
anActor->SetOpenGLClippingPlane();
}