Skip to content

Commit

Permalink
Refs #7931. Attempting to fix Windoze.
Browse files Browse the repository at this point in the history
I ran this on Linux first to see if anything broke. Looks to be fine, so I'll
try Windows now.
  • Loading branch information
Michael Reuter committed Sep 16, 2013
1 parent 6adc030 commit 4422295
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ class EXPORT_OPT_MANTIDVATES_SIMPLEGUI_VIEWWIDGETS StandardView : public ViewBas
void resetDisplay();
/// @see ViewBase::updateUI()
void updateUI();
void updateView();

protected slots:
/// Add a slice to the current dataset.
Expand All @@ -76,12 +77,14 @@ protected slots:
void onDestroyingSource(pqPipelineSource *src);
/// Invoke the RebinnerCutter on the current dataset.
void onRebinButtonClicked();
void onRenderDone();
/// Invoke the ScaleWorkspace on the current dataset.
void onScaleButtonClicked();

private:
Q_DISABLE_COPY(StandardView)

bool cameraReset;
QPointer<pqPipelineSource> rebinCut; ///< Holder for the RebinnerCutter
QPointer<pqPipelineSource> scaler; ///< Holder for the ScaleWorkspace
Ui::StandardView ui; ///< The standard view's UI form
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ public slots:
void setTimeSteps(bool withUpdate = false);
/// Provide updates to UI.
virtual void updateUI();
virtual void updateView();

signals:
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,8 @@ void MdViewerWidget::checkForUpdates()
this->currentView->setAxisScales();
pqActiveObjects::instance().setActiveSource(src);
this->currentView->setTimeSteps(true);
this->currentView->resetCamera();
//this->currentView->resetCamera();
this->currentView->updateView();
this->currentView->updateUI();
}
if (QString(proxy->GetXMLName()).contains("Threshold"))
Expand Down
18 changes: 18 additions & 0 deletions Code/Mantid/Vates/VatesSimpleGui/ViewWidgets/src/StandardView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ namespace SimpleGui
StandardView::StandardView(QWidget *parent) : ViewBase(parent)
{
this->ui.setupUi(this);
this->cameraReset = false;

// Set the cut button to create a slice on the data
QObject::connect(this->ui.cutButton, SIGNAL(clicked()), this,
Expand All @@ -58,6 +59,9 @@ StandardView::StandardView(QWidget *parent) : ViewBase(parent)
this, SLOT(onDestroyingSource(pqPipelineSource*)));

this->view = this->createRenderView(this->ui.renderFrame);

QObject::connect(this->view.data(), SIGNAL(endRender()),
this, SLOT(onRenderDone()));
}

StandardView::~StandardView()
Expand Down Expand Up @@ -150,6 +154,15 @@ void StandardView::onScaleButtonClicked()
this->getPvActiveSrc());
}

void StandardView::onRenderDone()
{
if (this->cameraReset)
{
this->resetCamera();
this->cameraReset = false;
}
}

void StandardView::renderAll()
{
std::cout << "In StandardView::renderAll" << std::endl;
Expand All @@ -174,6 +187,11 @@ void StandardView::updateUI()
this->ui.cutButton->setEnabled(true);
}

void StandardView::updateView()
{
this->cameraReset = true;
}

/**
* This function checks a pipeline source that ParaView says is being
* deleted. If the source is a Mantid rebinning filter, the restriction
Expand Down
4 changes: 4 additions & 0 deletions Code/Mantid/Vates/VatesSimpleGui/ViewWidgets/src/ViewBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,10 @@ void ViewBase::updateUI()
{
}

void ViewBase::updateView()
{
}

/**
* This function checks the current pipeline for a filter with the specified
* name. The function works for generic filter names only.
Expand Down

0 comments on commit 4422295

Please sign in to comment.