X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FXGUI%2FXGUI_ViewerProxy.cpp;h=19453efdb3a4719691ba02a5952c86c9a4cf14fe;hb=f8d51abf2ab6024a974d42c139f7650ccf0ef774;hp=e07c3693e75ca6e91446ddefc12c7d9d2b16b020;hpb=ff4aad301cd1f42683573988f65334f0db074655;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_ViewerProxy.cpp b/src/XGUI/XGUI_ViewerProxy.cpp index e07c3693e..19453efdb 100644 --- a/src/XGUI/XGUI_ViewerProxy.cpp +++ b/src/XGUI/XGUI_ViewerProxy.cpp @@ -51,6 +51,16 @@ void XGUI_ViewerProxy::setViewProjection(double theX, double theY, double theZ) } } +void XGUI_ViewerProxy::fitAll() +{ + if (myWorkshop->isSalomeMode()) { + myWorkshop->salomeConnector()->viewer()->fitAll(); + } + else { + XGUI_Viewer* aViewer = myWorkshop->mainWindow()->viewer(); + aViewer->activeViewWindow()->viewPort()->fitAll(); + } +} void XGUI_ViewerProxy::connectToViewer() { @@ -85,6 +95,11 @@ void XGUI_ViewerProxy::connectToViewer() connect(aViewer, SIGNAL(keyRelease(QKeyEvent*)), this, SIGNAL(keyRelease(QKeyEvent*))); + + connect(aViewer, SIGNAL(selectionChanged()), this, SIGNAL(selectionChanged())); + connect(aViewer, SIGNAL(contextMenuRequested(QContextMenuEvent*)), + this, SIGNAL(contextMenuRequested(QContextMenuEvent*))); + } else { XGUI_Viewer* aViewer = myWorkshop->mainWindow()->viewer(); @@ -111,6 +126,10 @@ void XGUI_ViewerProxy::connectToViewer() this, SLOT(onKeyPress(XGUI_ViewWindow*, QKeyEvent*))); connect(aViewer, SIGNAL(keyRelease(XGUI_ViewWindow*, QKeyEvent*)), this, SLOT(onKeyRelease(XGUI_ViewWindow*, QKeyEvent*))); + + connect(aViewer, SIGNAL(selectionChanged()), this, SIGNAL(selectionChanged())); + connect(aViewer, SIGNAL(contextMenuRequested(QContextMenuEvent*)), + this, SIGNAL(contextMenuRequested(QContextMenuEvent*))); } }