1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +03:00

0031547: Visualization - V3d_View creates V3d_Trihedron instance

- moved creating of V3d_View::myTrihedron from constructor to first attempt of displaying or calling it;
- moved creating of V3d_Viewer::myRGrid and V3d_Viewer::myCGrid to to first attempt of displaying or calling them;
- renamed V3d_Viewer::IsActive() to V3d_Viewer::IsGridActive();
- redefined V3d_View::Trihedron() and V3d_Viewer::Grid() by adding new argument toCreate
for opportunity to check the existence of the objects without their recreating.
This commit is contained in:
mkrylova
2020-12-31 09:37:51 +03:00
committed by bugmaster
parent 5de4b704fe
commit 5634c81a9b
11 changed files with 166 additions and 95 deletions

View File

@@ -197,7 +197,7 @@ void OCC_2dView::OnBUTTONGridValues()
void OCC_2dView::OnUpdateBUTTONGridValues(CCmdUI* pCmdUI)
{
Handle(V3d_Viewer) aViewer = myView->Viewer();
pCmdUI-> Enable( aViewer->IsActive() );
pCmdUI-> Enable( aViewer->IsGridActive() );
}
void OCC_2dView::OnBUTTONGridCancel()
@@ -211,7 +211,7 @@ void OCC_2dView::OnBUTTONGridCancel()
void OCC_2dView::OnUpdateBUTTONGridCancel(CCmdUI* pCmdUI)
{
Handle(V3d_Viewer) aViewer = myView->Viewer();
pCmdUI-> Enable( aViewer->IsActive() );
pCmdUI-> Enable( aViewer->IsGridActive() );
}
void OCC_2dView::OnSize(UINT nType, int cx, int cy)