From f0a558f26b86d83f20bf9437e6ed64c8385b537c Mon Sep 17 00:00:00 2001 From: asl Date: Thu, 18 Sep 2014 10:50:20 +0400 Subject: [PATCH] refs #457: only top view button should be available in 2d mode --- src/OCCViewer/OCCViewer_Utilities.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/OCCViewer/OCCViewer_Utilities.cxx b/src/OCCViewer/OCCViewer_Utilities.cxx index 1fe25f4f6..a90891852 100644 --- a/src/OCCViewer/OCCViewer_Utilities.cxx +++ b/src/OCCViewer/OCCViewer_Utilities.cxx @@ -6,7 +6,7 @@ #include "SUIT_ViewManager.h" #include "QtxActionToolMgr.h" - +#include #include #include @@ -30,7 +30,7 @@ void OCCViewer_Utilities::setViewer2DMode( OCCViewer_Viewer* theViewer, << OCCViewer_ViewWindow::RotationId << OCCViewer_ViewWindow::FrontId << OCCViewer_ViewWindow::BackId - << OCCViewer_ViewWindow::TopId + //<< OCCViewer_ViewWindow::TopId << OCCViewer_ViewWindow::BottomId << OCCViewer_ViewWindow::LeftId << OCCViewer_ViewWindow::RightId @@ -45,6 +45,9 @@ void OCCViewer_Utilities::setViewer2DMode( OCCViewer_Viewer* theViewer, if ( anAction ) anAction->setEnabled( !is2dMode ); } + QAction* aTop = aToolMgr->action( OCCViewer_ViewWindow::TopId ); + QtxMultiAction* aMulti = dynamic_cast( aTop->parent() ); + aMulti->setActiveAction( aTop ); // change view position Handle(V3d_View) aView3d = aView->getViewPort()->getView(); -- 2.39.2