From: vsv Date: Mon, 13 Jul 2015 13:49:39 +0000 (+0300) Subject: Fix some bugs with last view removing X-Git-Tag: V_1.3.0~22 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=cef53b662cbfce2f1d15f36075a75c9fad0a6da7;p=modules%2Fshaper.git Fix some bugs with last view removing --- diff --git a/src/NewGeom/NewGeom_SalomeViewer.cpp b/src/NewGeom/NewGeom_SalomeViewer.cpp index 41baca6a8..6803bfe8c 100644 --- a/src/NewGeom/NewGeom_SalomeViewer.cpp +++ b/src/NewGeom/NewGeom_SalomeViewer.cpp @@ -118,8 +118,8 @@ void NewGeom_SalomeViewer::setSelector(NewGeom_OCCSelector* theSel) this, SLOT(onDeleteView(SUIT_ViewWindow*))); connect(aMgr, SIGNAL(viewCreated(SUIT_ViewWindow*)), this, SLOT(onViewCreated(SUIT_ViewWindow*))); - connect(aMgr, SIGNAL(activated(SUIT_ViewWindow*)), - this, SLOT(onActivated(SUIT_ViewWindow*))); + connect(aMgr, SIGNAL(activated(SUIT_ViewManager*)), + this, SLOT(onActivated(SUIT_ViewManager*))); connect(aMgr, SIGNAL(mousePress(SUIT_ViewWindow*, QMouseEvent*)), this, SLOT(onMousePress(SUIT_ViewWindow*, QMouseEvent*))); @@ -248,9 +248,9 @@ void NewGeom_SalomeViewer::onViewCreated(SUIT_ViewWindow* theView) } //********************************************** -void NewGeom_SalomeViewer::onActivated(SUIT_ViewWindow* theView) +void NewGeom_SalomeViewer::onActivated(SUIT_ViewManager* theMgr) { - myView->setCurrentView(theView); + myView->setCurrentView(theMgr->getActiveView()); emit activated(myView); } diff --git a/src/NewGeom/NewGeom_SalomeViewer.h b/src/NewGeom/NewGeom_SalomeViewer.h index dcc9acee1..56ba4f824 100644 --- a/src/NewGeom/NewGeom_SalomeViewer.h +++ b/src/NewGeom/NewGeom_SalomeViewer.h @@ -148,7 +148,7 @@ Q_OBJECT void onTryCloseView(SUIT_ViewWindow*); void onDeleteView(SUIT_ViewWindow*); void onViewCreated(SUIT_ViewWindow*); - void onActivated(SUIT_ViewWindow*); + void onActivated(SUIT_ViewManager*); void onSelectionChanged(); void onViewTransformed(OCCViewer_ViewWindow::OperationType);