From c8f2504c6130de9d615e9adc1cf395f935edc551 Mon Sep 17 00:00:00 2001 From: Steven Hahn Date: Tue, 9 Dec 2014 16:33:48 -0500 Subject: [PATCH] Refs #7363. Set Active view to current view --- .../VatesSimpleGui/ViewWidgets/src/MdViewerWidget.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Code/Mantid/Vates/VatesSimpleGui/ViewWidgets/src/MdViewerWidget.cpp b/Code/Mantid/Vates/VatesSimpleGui/ViewWidgets/src/MdViewerWidget.cpp index 8f5a1f335172..17bb3b1187ca 100644 --- a/Code/Mantid/Vates/VatesSimpleGui/ViewWidgets/src/MdViewerWidget.cpp +++ b/Code/Mantid/Vates/VatesSimpleGui/ViewWidgets/src/MdViewerWidget.cpp @@ -434,7 +434,7 @@ void MdViewerWidget::renderWorkspace(QString wsname, int wstype) } pqPipelineSource* source = this->currentView->setPluginSource(sourcePlugin, wsname); - pqSaveDataReaction::saveActiveData("/tmp/data.vtk"); + //pqSaveDataReaction::saveActiveData("/tmp/data.vtk"); source->getProxy()->SetAnnotation(this->m_widgetName.toLatin1().data(), "1"); //this->ui.proxiesPanel->clear(); //this->ui.proxiesPanel->addProxy(source->getProxy(),"datasource",QStringList(),true); @@ -567,6 +567,15 @@ bool MdViewerWidget::eventFilter(QObject *obj, QEvent *ev) return true; } }*/ + if(ev->type() == QEvent::WindowActivate) + { + if(this->currentView) + { + pqView* view = this->currentView->getView(); + pqActiveObjects::instance().setActiveView(view); + pqActiveObjects::instance().setActiveSource(this->currentView->origSrc); + } + } return VatesViewerInterface::eventFilter(obj, ev); }