]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
refs #327 - Polyline is not shown during creation
authornds <nds@opencascade.com>
Fri, 31 Jan 2014 07:56:41 +0000 (07:56 +0000)
committernds <nds@opencascade.com>
Fri, 31 Jan 2014 07:56:41 +0000 (07:56 +0000)
src/HYDROCurveCreator/CurveCreator_Displayer.cxx
src/HYDROCurveCreator/CurveCreator_Displayer.h

index 5872e3f8add2a5b701fc1050e3a89557951526e2..6bc8df52bf6672c86f92e0376ef0c18fc3c1ee4a 100644 (file)
@@ -1,7 +1,8 @@
 #include "CurveCreator_Displayer.h"
 
-CurveCreator_Displayer::CurveCreator_Displayer( Handle_AIS_InteractiveContext theContext ) :
-  myContext( theContext )
+CurveCreator_Displayer::CurveCreator_Displayer( Handle_AIS_InteractiveContext theContext,
+                                                const int theZLayer ) :
+  myContext( theContext ), myZLayer( theZLayer )
 {
   myObjects.clear();
 }
@@ -23,6 +24,9 @@ void CurveCreator_Displayer::display( const Handle(AIS_InteractiveObject)& theOb
   myObjects.push_back( theObject );
   myContext->Display( theObject, Standard_False );
 
+  if ( myZLayer >= 0 )
+    myContext->SetZLayer( theObject, myZLayer );
+
   if( isUpdate )
     myContext->UpdateCurrentViewer();
 }
index ad762b7fa7210143031eb0819b66f32ef68b5125..f65e9d2ec01e759f8cafb0299ab321a1eb86a460 100644 (file)
@@ -13,7 +13,8 @@ class CURVECREATOR_EXPORT CurveCreator_Displayer
 typedef std::vector<Handle_AIS_InteractiveObject> AISObjectsList;
 
 public:
-  CurveCreator_Displayer(Handle_AIS_InteractiveContext theContext );
+  CurveCreator_Displayer( Handle_AIS_InteractiveContext theContext,
+                          const int theZLayer = -1 );
   ~CurveCreator_Displayer(void);
 
   void display( const Handle_AIS_InteractiveObject& theObject, bool isUpdate );
@@ -26,6 +27,7 @@ protected:
 private:
   Handle_AIS_InteractiveContext myContext;
   AISObjectsList                myObjects;
+  int                           myZLayer;
 };
 
 #endif