Salome HOME
compilation on Linux
[modules/hydro.git] / src / HYDRO_tests / TestViewer.cxx
index 44e3fc2c94f869f4d78c2cd614ea5c6e6fae2274..8315d811ff5d02c3cfccbe535c3a6d775c89b465 100644 (file)
@@ -133,6 +133,10 @@ void TestViewer::show( const TopoDS_Shape& theShape, int theMode, bool isFitAll,
   context()->EraseAll( Standard_False );
   
   myKey = theKey;
+
+  if( theShape.IsNull() )
+    return;
+
   int i = 0;
   if( theShape.ShapeType()==TopAbs_SHELL )
   {
@@ -243,3 +247,10 @@ Handle_Aspect_ColorScale TestViewer::showColorScale( bool isShow )
   }
   return aColorScale;
 }
+
+void TestViewer::select( int theViewX, int theViewY )
+{
+  Handle(V3d_View) aView = myViewWindow->getViewPort()->getView();
+  context()->MoveTo( theViewX, theViewY, aView );
+  context()->Select();
+}