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
}
}
-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
void activateViewer(bool toActivate);
// Fit all along Z (perpendicular to display)
- virtual void Zfitall();
+ //virtual void Zfitall();
private slots:
void onMousePress(SUIT_ViewWindow*, QMouseEvent*);
{
Handle(AIS_InteractiveContext) aContext = AISContext();
if (!aContext.IsNull() && isUpdateEnabled()) {
- myWorkshop->viewer()->Zfitall();
+ //myWorkshop->viewer()->Zfitall();
aContext->UpdateCurrentViewer();
} else {
myNeedUpdate = true;
//***************************************
-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
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