]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
#1042 Sometimes when setting distance constraints, the input field is not displayed...
authornds <nds@opencascade.com>
Thu, 10 Dec 2015 07:00:47 +0000 (10:00 +0300)
committernds <nds@opencascade.com>
Thu, 10 Dec 2015 07:00:47 +0000 (10:00 +0300)
SALOME mode: compilation correction

src/NewGeom/NewGeom_SalomeViewer.cpp
src/NewGeom/NewGeom_SalomeViewer.h
src/XGUI/XGUI_ViewerProxy.cpp

index e91e0921921bc5a6adf06b47d4e638fe9cb3b861..ac0b1c3b0991baf6790557fa78a983b7edf6eca7 100644 (file)
@@ -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<OCCViewer_ViewWindow*>(aMgr->getActiveView());
+    aViewPort = aWnd->getViewPort();
+  }
+  return aViewPort;
+}
+
 //**********************************************
 void NewGeom_SalomeViewer::setSelector(NewGeom_OCCSelector* theSel)
 {
index ee250cae0e704739a7c5f8bd15ba22f6b4ae9b13..a9e9d19e2e8501d1386b1c18a1240963c7b76eec 100644 (file)
@@ -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);
 
index 54dc14670143a4886ebefd7afde87cdae7ed223c..caeaff5aa94e871f57900ec56b8ffa08a0a8f165 100644 (file)
@@ -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()) ?