#include <OCCViewer_ViewManager.h>
#include <OCCViewer_ViewModel.h>
+#include <OCCViewer_ViewWindow.h>
#include <OCCViewer_AISSelector.h>
dynamic_cast<OCCViewer_ViewManager*>( anApp->createViewManager( OCCViewer_Viewer::Type() ) );
if( myPreviewViewManager )
{
- anApp->selectionMgr()->setEnabled(false);
- myPreviewViewManager->setTitle( tr( "CREATE_CURVE" ) );
+ //anApp->selectionMgr()->setEnabled(false); // what the hell?!
+ myPreviewViewManager->setTitle( tr( "CREATE_POLYLINE" ) );
OCCViewer_Viewer* aViewer = myPreviewViewManager->getOCCViewer();
aViewer->enableSelection(true);
aViewer->enableMultiselection(true);
Handle_AIS_InteractiveContext aCtx = aViewer->getAISContext();
+ OCCViewer_ViewWindow* vw = (OCCViewer_ViewWindow*)myPreviewViewManager->getActiveView();
+ vw->onTopView();
+
myAISCurve = new HYDROGUI_AISCurve(myCurve, aCtx);
myAISCurve->Display();
}
else{
- myCurve = new CurveCreator_Curve(CurveCreator::Dim3d);
+ myCurve = new CurveCreator_Curve(CurveCreator::Dim2d);
aPanel->setCurve(myCurve);
- QString aNewName = HYDROGUI_Tool::GenerateObjectName( module(), tr("POLYLINE_PREFIX") );
+ QString aNewName = HYDROGUI_Tool::GenerateObjectName( module(), "Polyline" );
aPanel->setPolylineName(aNewName);
}
aPanel->setCurve(myCurve);