From cef53b662cbfce2f1d15f36075a75c9fad0a6da7 Mon Sep 17 00:00:00 2001 From: vsv Date: Mon, 13 Jul 2015 16:49:39 +0300 Subject: [PATCH] Fix some bugs with last view removing --- src/NewGeom/NewGeom_SalomeViewer.cpp | 8 ++++---- src/NewGeom/NewGeom_SalomeViewer.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) 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); -- 2.39.2