From: nds Date: Thu, 10 Dec 2015 07:00:47 +0000 (+0300) Subject: #1042 Sometimes when setting distance constraints, the input field is not displayed... X-Git-Tag: V_2.1.0~200 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=59a007784d1e103bcb352c515eb6feafa170f1ff;p=modules%2Fshaper.git #1042 Sometimes when setting distance constraints, the input field is not displayed in the 3D view SALOME mode: compilation correction --- diff --git a/src/NewGeom/NewGeom_SalomeViewer.cpp b/src/NewGeom/NewGeom_SalomeViewer.cpp index e91e09219..ac0b1c3b0 100644 --- a/src/NewGeom/NewGeom_SalomeViewer.cpp +++ b/src/NewGeom/NewGeom_SalomeViewer.cpp @@ -88,6 +88,19 @@ Handle(V3d_View) NewGeom_SalomeViewer::activeView() const return Handle(V3d_View)(); } +//********************************************** +QWidget* NewGeom_SalomeViewer::activeViewPort() const +{ + QWidget* aViewPort; + if (mySelector) { + OCCViewer_Viewer* aViewer = mySelector->viewer(); + SUIT_ViewManager* aMgr = aViewer->getViewManager(); + OCCViewer_ViewWindow* aWnd = static_cast(aMgr->getActiveView()); + aViewPort = aWnd->getViewPort(); + } + return aViewPort; +} + //********************************************** void NewGeom_SalomeViewer::setSelector(NewGeom_OCCSelector* theSel) { diff --git a/src/NewGeom/NewGeom_SalomeViewer.h b/src/NewGeom/NewGeom_SalomeViewer.h index ee250cae0..a9e9d19e2 100644 --- a/src/NewGeom/NewGeom_SalomeViewer.h +++ b/src/NewGeom/NewGeom_SalomeViewer.h @@ -79,6 +79,9 @@ Q_OBJECT //! Returns Vsd_View object from currently active view window virtual Handle(V3d_View) activeView() const; + //! Returns viewer view port + virtual QWidget* activeViewPort() const; + //! Enable or disable selection in the viewer virtual void enableSelection(bool isEnabled); diff --git a/src/XGUI/XGUI_ViewerProxy.cpp b/src/XGUI/XGUI_ViewerProxy.cpp index 54dc14670..caeaff5aa 100644 --- a/src/XGUI/XGUI_ViewerProxy.cpp +++ b/src/XGUI/XGUI_ViewerProxy.cpp @@ -55,7 +55,7 @@ Handle(V3d_View) XGUI_ViewerProxy::activeView() const QWidget* XGUI_ViewerProxy::activeViewPort() const { #ifdef HAVE_SALOME - return myWorkshop->salomeConnector()->viewer()->activeView(); + return myWorkshop->salomeConnector()->viewer()->activeViewPort(); #else AppElements_Viewer* aViewer = myWorkshop->mainWindow()->viewer(); return (aViewer->activeViewWindow()) ?