File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,8 +57,14 @@ def setAnimationStepper( self, stepper ):
5757 plot .setAnimationStepper ( stepper )
5858
5959 def interact (self ,* args ,** kargs ):
60- warnings .warn ("Press 'Q' to exit interactive mode and continue script execution" )
60+ if self .renWin is None :
61+ warnings .warn ("Cannot interact if you did not open the canvas yet" )
62+ return
6163 interactor = self .renWin .GetInteractor ()
64+ if interactor is None :
65+ warnings .warn ("Cannot start interaction. Blank plot?" )
66+ return
67+ warnings .warn ("Press 'Q' to exit interactive mode and continue script execution" )
6268 interactor .Start ()
6369
6470 def leftButtonPressEvent (self ,obj ,event ):
Original file line number Diff line number Diff line change @@ -33,6 +33,14 @@ add_test(vcs_test_clear_empy_canvas
3333 ${CMAKE_INSTALL_PREFIX} /bin/python
3434 ${cdat_SOURCE_DIR} /testing/vcs/test_clear_empty_canvas.py
3535 )
36+ add_test (vcs_test_interact_no_open
37+ ${CMAKE_INSTALL_PREFIX} /bin/python
38+ ${cdat_SOURCE_DIR} /testing/vcs/test_vcs_interact_no_open.py
39+ )
40+ add_test (vcs_test_interact_no_plot
41+ ${CMAKE_INSTALL_PREFIX} /bin/python
42+ ${cdat_SOURCE_DIR} /testing/vcs/test_vcs_interact_no_plot.py
43+ )
3644
3745add_test (vcs_test_colorcells
3846 ${CMAKE_INSTALL_PREFIX} /bin/python
You can’t perform that action at this time.
0 commit comments