From: asl Date: Thu, 18 Sep 2014 06:50:20 +0000 (+0400) Subject: refs #457: only top view button should be available in 2d mode X-Git-Tag: V7_5_0a1~2^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fasl%2Fhydro_porting_741;p=modules%2Fgui.git refs #457: only top view button should be available in 2d mode --- 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();