#include <OCCViewer_ViewFrame.h>
#include <OCCViewer_ViewModel.h>
+#include <OCCViewer_ViewPort3d.h>
#include <SUIT_ViewManager.h>
#include <QtxActionToolMgr.h>
+#include <V3d_View.hxx>
+
#include <QAction>
void OCCViewer_Utilities::setViewer2DMode( OCCViewer_Viewer* theViewer,
}
// change view position
- switch ( theMode ) {
- case OCCViewer_ViewWindow::XYPlane:
- aView->onTopView();
- break;
- case OCCViewer_ViewWindow::XZPlane:
- aView->onLeftView();
- break;
- case OCCViewer_ViewWindow::YZPlane:
- aView->onFrontView();
- break;
+ Handle(V3d_View) aView3d = aView->getViewPort()->getView();
+ if ( !aView3d.IsNull() ) {
+ switch ( theMode ) {
+ case OCCViewer_ViewWindow::XYPlane:
+ aView3d->SetProj (V3d_Zpos);
+ break;
+ case OCCViewer_ViewWindow::XZPlane:
+ aView3d->SetProj (V3d_Yneg);
+ break;
+ case OCCViewer_ViewWindow::YZPlane:
+ aView3d->SetProj (V3d_Xpos);
+ break;
+ }
}
}