X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROGUI%2FHYDROGUI_RecognizeContoursOp.cxx;h=9af735e48880f823afa5ab68a16f6f1c4cd22ce5;hb=HEAD;hp=9eb098fed541c823c562d616f07f6189ff9ddcc2;hpb=298c1759f9b1d4a7dc316742b7a13008eb4234e1;p=modules%2Fhydro.git diff --git a/src/HYDROGUI/HYDROGUI_RecognizeContoursOp.cxx b/src/HYDROGUI/HYDROGUI_RecognizeContoursOp.cxx index 9eb098fe..9af735e4 100644 --- a/src/HYDROGUI/HYDROGUI_RecognizeContoursOp.cxx +++ b/src/HYDROGUI/HYDROGUI_RecognizeContoursOp.cxx @@ -21,7 +21,7 @@ #include "HYDROGUI_RecognizeContoursDlg.h" #include "HYDROGUI_Module.h" #include "HYDROGUI_Shape.h" -#include "HYDROGUI_Tool.h" +#include "HYDROGUI_Tool2.h" #include "HYDROGUI_UpdateFlags.h" #include "HYDROGUI_OCCSelector.h" #include "HYDROGUI_ZLayers.h" @@ -127,12 +127,11 @@ void HYDROGUI_RecognizeContoursOp::startOperation() // Export the selected image to GEOM module if ( aStudy && aViewMgr ) { - SALOMEDS::Study_var aDSStudy = GeometryGUI::ClientStudyToStudy( aStudy->studyDS() ); GEOM::GEOM_Gen_var aGeomEngine = GeometryGUI::GetGeomGen(); QString aGeomPictureEntry; - HYDROData_GeomTool::createFaceInGEOM( aGeomEngine, aDSStudy, aQImage.width(), aQImage.height(), + HYDROData_GeomTool::createFaceInGEOM( aGeomEngine, aQImage.width(), aQImage.height(), anImageName, aGeomPictureEntry ); if ( !aGeomPictureEntry.isEmpty() ) { @@ -228,7 +227,7 @@ bool HYDROGUI_RecognizeContoursOp::processApply( int& theUpdateFlags, if( !aPolylineObj.IsNull() ) { aPolylineObj->SetName( aName ); - aPolylineObj->ImportShape( aShape ); + aPolylineObj->ImportShape( aShape, false, NULL ); aPolylineObj->SetWireColor( HYDROData_PolylineXY::DefaultWireColor() ); aPolylineObj->Update(); @@ -379,7 +378,7 @@ void HYDROGUI_RecognizeContoursOp::updateRecognizedPolylines() TopoDS_Shape aSubShape = aSubShapes.Value( i ); // Transform the sub-shape - aPolylineObj->ImportShape( aSubShape ); + aPolylineObj->ImportShape( aSubShape, false, NULL ); aPolylineObj->Transform( aTrsf ); /* @@ -443,7 +442,7 @@ void HYDROGUI_RecognizeContoursOp::onSelectionChanged( const QStringList& theSel if ( !aCtx.IsNull() ) { foreach ( QString aName, myPolylineShapes.keys() ) { Handle(AIS_InteractiveObject) anObject = - myPolylineShapes.value(aName)->getAISObject(); + myPolylineShapes.value(aName)->getAISObjects()[0]; bool isSelected = theSelectedNames.contains( aName ); if ( ( isSelected && !aCtx->IsSelected( anObject) ) || @@ -468,9 +467,9 @@ void HYDROGUI_RecognizeContoursOp::onViewerSelectionChanged() return; } - Handle(AIS_InteractiveContext) aCtx = NULL; OCCViewer_ViewManager* aViewManager = getPreviewManager(); + Handle(AIS_InteractiveContext) aCtx = NULL; if ( aViewManager ) { if ( OCCViewer_Viewer* aViewer = aViewManager->getOCCViewer() ) { aCtx = aViewer->getAISContext(); @@ -481,7 +480,7 @@ void HYDROGUI_RecognizeContoursOp::onViewerSelectionChanged() QStringList aSelectedNames; foreach ( QString aName, myPolylineShapes.keys() ) { - bool isSelected = aCtx->IsSelected( myPolylineShapes.value(aName)->getAISObject() ); + bool isSelected = aCtx->IsSelected( myPolylineShapes.value(aName)->getAISObjects()[0] ); if ( isSelected ) { aSelectedNames << aName; } @@ -514,4 +513,4 @@ void HYDROGUI_RecognizeContoursOp::cleanup() // update the object browser module()->getApp()->updateObjectBrowser( true ); } -} \ No newline at end of file +}