]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Remove ZFitAll
authorvsv <vitaly.smetannikov@opencascade.com>
Fri, 30 Dec 2016 13:40:03 +0000 (16:40 +0300)
committervsv <vitaly.smetannikov@opencascade.com>
Fri, 30 Dec 2016 13:40:03 +0000 (16:40 +0300)
src/ModuleBase/ModuleBase_IViewer.h
src/SHAPERGUI/SHAPERGUI_SalomeViewer.cpp
src/SHAPERGUI/SHAPERGUI_SalomeViewer.h
src/XGUI/XGUI_Displayer.cpp
src/XGUI/XGUI_ViewerProxy.cpp
src/XGUI/XGUI_ViewerProxy.h

index c2f46ed9cd9980c441bcc929cfe0abf8ddd08f7f..5331ba0208b008608a8d956c7bb335551d75cb7f 100644 (file)
@@ -109,7 +109,7 @@ Q_OBJECT
   virtual bool canDragByMouse() const { return true; }
 
   /// Fit all along Z (perpendicular to display)
   virtual bool canDragByMouse() const { return true; }
 
   /// Fit all along Z (perpendicular to display)
-  virtual void Zfitall() = 0;
+  //virtual void Zfitall() = 0;
 
 signals:
   /// Signal emited when last view window is closed
 
 signals:
   /// Signal emited when last view window is closed
index 4d978aeb83c1f3e3e65c0deb850205fd3943e3f8..c341e0f1a2aaac39335d03c021d2e3a34721845e 100644 (file)
@@ -463,21 +463,21 @@ void SHAPERGUI_SalomeViewer::activateViewer(bool toActivate)
   }
 }
 
   }
 }
 
-void SHAPERGUI_SalomeViewer::Zfitall()
-{
-  if (!mySelector || !mySelector->viewer())
-    return;
-  SUIT_ViewManager* aMgr = mySelector->viewer()->getViewManager();
-  /// WORKAROUND for issue #1798. SUIT_ViewManager::closeAllViews() should nullify myActiveView
-  /// As a result, we need to check views count in manager
-  if (aMgr->getViews().size() > 0) {
-    OCCViewer_ViewFrame* aView = dynamic_cast<OCCViewer_ViewFrame*>(aMgr->getActiveView());
-    if (aView) {
-      OCCViewer_ViewWindow* aWnd = aView->getView(OCCViewer_ViewFrame::MAIN_VIEW);
-      Handle(V3d_View) aView3d = aWnd->getViewPort()->getView();
-      aView3d->ZFitAll();
-      if (aView3d->Depth() < 0.1)
-        aView3d->DepthFitAll();
-    }
-  }
-}
\ No newline at end of file
+//void SHAPERGUI_SalomeViewer::Zfitall()
+//{
+//  if (!mySelector || !mySelector->viewer())
+//    return;
+//  SUIT_ViewManager* aMgr = mySelector->viewer()->getViewManager();
+//  /// WORKAROUND for issue #1798. SUIT_ViewManager::closeAllViews() should nullify myActiveView
+//  /// As a result, we need to check views count in manager
+//  if (aMgr->getViews().size() > 0) {
+//    OCCViewer_ViewFrame* aView = dynamic_cast<OCCViewer_ViewFrame*>(aMgr->getActiveView());
+//    if (aView) {
+//      OCCViewer_ViewWindow* aWnd = aView->getView(OCCViewer_ViewFrame::MAIN_VIEW);
+//      Handle(V3d_View) aView3d = aWnd->getViewPort()->getView();
+//      aView3d->ZFitAll();
+//      if (aView3d->Depth() < 0.1)
+//        aView3d->DepthFitAll();
+//    }
+//  }
+//}
\ No newline at end of file
index 1deee5167e017dd1132c81c5a6fd583d387d01d9..7e02278a1c6de72cd6d81ad688ba9bea99bfa532 100644 (file)
@@ -150,7 +150,7 @@ Q_OBJECT
   void activateViewer(bool toActivate);
 
   // Fit all along Z (perpendicular to display)
   void activateViewer(bool toActivate);
 
   // Fit all along Z (perpendicular to display)
-  virtual void Zfitall();
+  //virtual void Zfitall();
 
  private slots:
   void onMousePress(SUIT_ViewWindow*, QMouseEvent*);
 
  private slots:
   void onMousePress(SUIT_ViewWindow*, QMouseEvent*);
index c807f222ee2270342ab723b8523ce3384e0e06c4..fc9b169dfac26d536250e47281de9bd461c9d41c 100644 (file)
@@ -961,7 +961,7 @@ void XGUI_Displayer::updateViewer() const
 {
   Handle(AIS_InteractiveContext) aContext = AISContext();
   if (!aContext.IsNull() && isUpdateEnabled()) {
 {
   Handle(AIS_InteractiveContext) aContext = AISContext();
   if (!aContext.IsNull() && isUpdateEnabled()) {
-    myWorkshop->viewer()->Zfitall();
+    //myWorkshop->viewer()->Zfitall();
     aContext->UpdateCurrentViewer();
   } else {
     myNeedUpdate = true;
     aContext->UpdateCurrentViewer();
   } else {
     myNeedUpdate = true;
index 1b9e3fb0e9976b63d6a78ba8e2a137bbbf4ee73e..e31fe57ea3240d9d9359fc6032f63f71f683eab6 100644 (file)
@@ -373,18 +373,18 @@ bool XGUI_ViewerProxy::canDragByMouse() const
 
 
 //***************************************
 
 
 //***************************************
-void XGUI_ViewerProxy::Zfitall()
-{
-#ifdef HAVE_SALOME
-  myWorkshop->salomeConnector()->viewer()->Zfitall();
-#else
-  AppElements_Viewer* aViewer = myWorkshop->mainWindow()->viewer();
-  AppElements_ViewWindow* aView = aViewer->activeViewWindow();
-  if (aView) {
-    Handle(V3d_View) aView3d = aView->v3dView();
-    aView3d->ZFitAll();
-    if (aView3d->Depth() < 0.1)
-      aView3d->DepthFitAll();
-  }
-#endif
-}
\ No newline at end of file
+//void XGUI_ViewerProxy::Zfitall()
+//{
+//#ifdef HAVE_SALOME
+//  myWorkshop->salomeConnector()->viewer()->Zfitall();
+//#else
+//  AppElements_Viewer* aViewer = myWorkshop->mainWindow()->viewer();
+//  AppElements_ViewWindow* aView = aViewer->activeViewWindow();
+//  if (aView) {
+//    Handle(V3d_View) aView3d = aView->v3dView();
+//    aView3d->ZFitAll();
+//    if (aView3d->Depth() < 0.1)
+//      aView3d->DepthFitAll();
+//  }
+//#endif
+//}
\ No newline at end of file
index 9969ae9e40abb7db82068c3d6d6c3caa3ff214f9..24b945ddf7e8c416bef4b98553c1ea51b21040d0 100644 (file)
@@ -95,7 +95,7 @@ Q_OBJECT
   virtual bool canDragByMouse() const;
 
   // Fit all along Z (perpendicular to display)
   virtual bool canDragByMouse() const;
 
   // Fit all along Z (perpendicular to display)
-  virtual void Zfitall();
+  //virtual void Zfitall();
 
 signals:
   /// Emits by mouse entering the view port
 
 signals:
   /// Emits by mouse entering the view port