Skip to content

Commit

Permalink
Refs #7363. change cut from SliceView
Browse files Browse the repository at this point in the history
  • Loading branch information
quantumsteve committed Dec 8, 2014
1 parent ec68593 commit 2ab748d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
@@ -1,6 +1,7 @@
#ifndef MULTISLICEVIEW_H_
#define MULTISLICEVIEW_H_

#include "MantidKernel/VMD.h"
#include "ui_MultisliceView.h"
#include "MantidVatesSimpleGuiViewWidgets/ViewBase.h"
#include "MantidVatesSimpleGuiViewWidgets/WidgetDllOption.h"
Expand Down Expand Up @@ -87,6 +88,9 @@ protected slots:
int button, int modifier);
/// Launch SliceViewer with the specified cut.
void showCutInSliceViewer(int axisIndex, double sliceOffsetOnAxis);

//// changes the slice point in VATES.
void changedSlicePoint(Mantid::Kernel::VMD selectedPoint);

private:
Q_DISABLE_COPY(MultiSliceView)
Expand Down
Expand Up @@ -135,6 +135,13 @@ void MultiSliceView::checkSliceViewCompat()
QObject::disconnect(this->mainView, 0, this, 0);
}
}

void MultiSliceView::changedSlicePoint(Mantid::Kernel::VMD selectedPoint)
{
vtkSMPropertyHelper(this->mainView->getProxy(),"XSlicesValues").Set(selectedPoint[0]);
this->mainView->getProxy()->UpdateVTKObjects();
this->mainView->render();
}

/**
* This function is responsible for opening the given cut in SliceViewer.
Expand Down Expand Up @@ -240,6 +247,7 @@ void MultiSliceView::showCutInSliceViewer(int axisIndex,
// Set the slice points, etc, using the XML definition of the plane function
w->getSlicer()->openFromXML( QString::fromStdString(rks.createXMLString()) );
w->show();
this->connect(w->getSlicer(), SIGNAL(changedSlicePoint(Mantid::Kernel::VMD)), SLOT(changedSlicePoint(Mantid::Kernel::VMD)));
}
catch (std::runtime_error & e)
{
Expand Down
Expand Up @@ -120,6 +120,7 @@ void SplatterPlotView::destroyView()
builder->destroy(this->splatSource);
}
builder->destroy(this->view);
pqActiveObjects::instance().setActiveSource(this->origSrc);
}

pqRenderView* SplatterPlotView::getView()
Expand Down

0 comments on commit 2ab748d

Please sign in to comment.