From: apo Date: Tue, 24 Jun 2008 12:44:54 +0000 (+0000) Subject: Debugging of the slider functionality X-Git-Tag: TG_VISU_2008_2008-06-26~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2768565d1538c0ccdd643f674e7364714536b91d;p=modules%2Fvisu.git Debugging of the slider functionality - To check whether VTK view is current view or not --- diff --git a/src/VISUGUI/VisuGUI_Slider.cxx b/src/VISUGUI/VisuGUI_Slider.cxx index d7be50ca..229b91b4 100644 --- a/src/VISUGUI/VisuGUI_Slider.cxx +++ b/src/VISUGUI/VisuGUI_Slider.cxx @@ -506,7 +506,10 @@ void VisuGUI_Slider::onSelectionChanged() } } - enableControls( !checkHolderList() ); + VISU::View_var aView = myViewManager->GetCurrentView(); + + enableControls( !checkHolderList() && !CORBA::is_nil( aView.in() ) ); + updateMemoryState(); } @@ -583,7 +586,7 @@ void VisuGUI_Slider::onLast() //---------------------------------------------------------------------------- void VisuGUI_Slider::onValueChanged( int value ) { - if( checkHolderList() ){ + if ( checkHolderList() ) { enableControls( false ); return; } @@ -595,18 +598,20 @@ void VisuGUI_Slider::onValueChanged( int value ) 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 );