mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-29 11:00:33 +05:00
Fix for '0053430: 3D Sketch' issue.
This commit is contained in:
parent
39c4bbe53d
commit
b11dda6c23
@ -1389,18 +1389,25 @@ void EntityGUI_3DSketcherDlg::displayTrihedron (int selMode)
|
|||||||
// Add trihedron to preview
|
// Add trihedron to preview
|
||||||
SUIT_ViewWindow* vw = SUIT_Session::session()->activeApplication()->desktop()->activeWindow();
|
SUIT_ViewWindow* vw = SUIT_Session::session()->activeApplication()->desktop()->activeWindow();
|
||||||
|
|
||||||
|
SOCC_Viewer* anOCCViewer = dynamic_cast<SOCC_Viewer*>( vw->getViewManager()->getViewModel() );
|
||||||
|
if( !anOCCViewer )
|
||||||
|
return;
|
||||||
|
|
||||||
|
Handle(AIS_InteractiveContext) anAISContext = anOCCViewer->getAISContext();
|
||||||
|
if( !anAISContext )
|
||||||
|
return;
|
||||||
|
|
||||||
gp_Pnt P(getLastPoint().x,getLastPoint().y,getLastPoint().z);
|
gp_Pnt P(getLastPoint().x,getLastPoint().y,getLastPoint().z);
|
||||||
Handle(Geom_Axis2Placement) anAxis = new Geom_Axis2Placement(P,gp::DZ(),gp::DX());
|
Handle(Geom_Axis2Placement) anAxis = new Geom_Axis2Placement(P,gp::DZ(),gp::DX());
|
||||||
Handle(AIS_Trihedron) anIO = new AIS_Trihedron(anAxis);
|
Handle(AIS_Trihedron) anIO = new AIS_Trihedron(anAxis);
|
||||||
anIO->GetContext()->Activate(anIO, selMode);
|
|
||||||
|
|
||||||
SOCC_Prs* aSPrs = dynamic_cast<SOCC_Prs*>
|
SOCC_Prs* aSPrs = dynamic_cast<SOCC_Prs*>( anOCCViewer->CreatePrs(0) );
|
||||||
(((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->CreatePrs(0));
|
|
||||||
|
|
||||||
if (aSPrs) {
|
if (aSPrs) {
|
||||||
aSPrs->PrependObject(anIO);
|
aSPrs->PrependObject(anIO);
|
||||||
GEOMBase_Helper::displayPreview(aSPrs, true, true);
|
GEOMBase_Helper::displayPreview(aSPrs, true, true);
|
||||||
}
|
}
|
||||||
|
anAISContext->Activate(anIO, selMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
//================================================================
|
//================================================================
|
||||||
|
Loading…
Reference in New Issue
Block a user