}
}
- enableControls( !checkHolderList() );
+ VISU::View_var aView = myViewManager->GetCurrentView();
+
+ enableControls( !checkHolderList() && !CORBA::is_nil( aView.in() ) );
+
updateMemoryState();
}
//----------------------------------------------------------------------------
void VisuGUI_Slider::onValueChanged( int value )
{
- if( checkHolderList() ){
+ if ( checkHolderList() ) {
enableControls( false );
return;
}
VISU::ColoredPrs3dHolder::TimeStampsRange_var aTimeStampsRange = aHolder->GetTimeStampsRange();
CORBA::Long aLength = aTimeStampsRange->length();
- if(value < 0 || aLength <= value)
+ if ( value < 0 || aLength <= value )
return;
VISU::ColoredPrs3dHolder::BasicInput_var anInput = aHolder->GetBasicInput();
CORBA::Long aTimeStampNumber = anInput->myTimeStampNumber;
CORBA::Long aNumber = aTimeStampsRange[ value ].myNumber;
- if(aNumber == aTimeStampNumber)
+ if ( aNumber == aTimeStampNumber )
return;
VISU::View_var aView = myViewManager->GetCurrentView();
- if ( CORBA::is_nil( aView.in() ) )
+ if ( CORBA::is_nil( aView.in() ) ) {
+ enableControls( false );
return;
+ }
VISU::View3D_var aView3D = VISU::View3D::_narrow( aView );