]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
refs #457: only top view button should be available in 2d mode asl/hydro_porting_741
authorasl <alexander.solovyov@opencascade.com>
Thu, 18 Sep 2014 06:50:20 +0000 (10:50 +0400)
committerasl <alexander.solovyov@opencascade.com>
Thu, 18 Sep 2014 06:50:20 +0000 (10:50 +0400)
src/OCCViewer/OCCViewer_Utilities.cxx

index 1fe25f4f6b95a338b0e5dfa8019055d71e7af69a..a908918520bae22cd69c746546312b13a6d4e113 100644 (file)
@@ -6,7 +6,7 @@
 
 #include "SUIT_ViewManager.h"
 #include "QtxActionToolMgr.h"
-
+#include <QtxMultiAction.h>
 #include <V3d_View.hxx>
 
 #include <QAction>
@@ -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<QtxMultiAction*>( aTop->parent() );
+  aMulti->setActiveAction( aTop );
 
   // change view position
   Handle(V3d_View) aView3d = aView->getViewPort()->getView();