Salome HOME
OCC functionality moving out from the widget
[modules/hydro.git] / src / HYDROCurveCreator / CurveCreator_Curve.cxx
index d0c18958846d6f6da2886283a1a2fb217d2092a6..25939c148716e0bf549d00a75a4e8cb04a5838e5 100644 (file)
@@ -43,6 +43,8 @@
 
 #include <stdio.h>
 
+//#define AIS_CURVE_DISPLAY
+
 //=======================================================================
 // function: Constructor
 // purpose:
@@ -56,6 +58,9 @@ CurveCreator_Curve::CurveCreator_Curve( const CurveCreator::Dimension theDimensi
   myUndoDepth (-1),
   myOpLevel(0)
 {
+#ifdef AIS_CURVE_DISPLAY
+  myAISCurve = new CurveCreator_AISCurve( this );
+#endif
 }
 
 //=======================================================================
@@ -105,6 +110,10 @@ std::string CurveCreator_Curve::getUniqSectionName() const
 void CurveCreator_Curve::setDisplayer( CurveCreator_Displayer* theDisplayer )
 {
   myDisplayer = theDisplayer;
+  
+#ifdef AIS_CURVE_DISPLAY
+  myDisplayer->displayAIS( myAISCurve, false );
+#endif
 }
 
 //=======================================================================
@@ -352,8 +361,12 @@ void CurveCreator_Curve::getCoordinates( int theISection, int theIPoint, double&
 void CurveCreator_Curve::redisplayCurve()
 {
   if( myDisplayer ) {
+#ifdef AIS_CURVE_DISPLAY
+    myDisplayer->redisplayAIS(myAISCurve, false);
+#else
     myDisplayer->erase( false );
     myDisplayer->display( constructWire(), true );
+#endif
   }
 }