+/**
+ * Set Z layer for the operation preview.
+ \param theLayer a layer position
+ */
+void HYDROGUI_PolylineOp::updatePreviewZLayer( int theLayer )
+{
+ HYDROGUI_Operation::updatePreviewZLayer( theLayer );
+
+ int aZLayer = getPreviewZLayer();
+ if ( aZLayer >= 0 )
+ {
+ if( getPreviewManager() )
+ {
+ if ( OCCViewer_Viewer* aViewer = getPreviewManager()->getOCCViewer() )
+ {
+ Handle(AIS_InteractiveContext) aCtx = aViewer->getAISContext();
+ if( !aCtx.IsNull() )
+ {
+ Handle(AIS_InteractiveObject) anObject = myCurve->getAISObject( true );
+ aCtx->SetZLayer( anObject, aZLayer );
+ }
+ }
+ }
+ }
+}
+