From 71d326866d30d4539ab89636b3cd715334caee3b Mon Sep 17 00:00:00 2001 From: nds Date: Fri, 31 Jan 2014 07:56:41 +0000 Subject: [PATCH] refs #327 - Polyline is not shown during creation --- src/HYDROCurveCreator/CurveCreator_Displayer.cxx | 8 ++++++-- src/HYDROCurveCreator/CurveCreator_Displayer.h | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/HYDROCurveCreator/CurveCreator_Displayer.cxx b/src/HYDROCurveCreator/CurveCreator_Displayer.cxx index 5872e3f8..6bc8df52 100644 --- a/src/HYDROCurveCreator/CurveCreator_Displayer.cxx +++ b/src/HYDROCurveCreator/CurveCreator_Displayer.cxx @@ -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(); } diff --git a/src/HYDROCurveCreator/CurveCreator_Displayer.h b/src/HYDROCurveCreator/CurveCreator_Displayer.h index ad762b7f..f65e9d2e 100644 --- a/src/HYDROCurveCreator/CurveCreator_Displayer.h +++ b/src/HYDROCurveCreator/CurveCreator_Displayer.h @@ -13,7 +13,8 @@ class CURVECREATOR_EXPORT CurveCreator_Displayer typedef std::vector 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 -- 2.39.2