Skip to content

Commit

Permalink
Refs #6818. Add ability to change LOD on view.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Reuter committed Apr 3, 2013
1 parent b3a9337 commit fda0724
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ public slots:
void onColorMapChange(const pqColorMapModel *model);
/// Set the data color scale range to the requested bounds.
void onColorScaleChange(double min, double max);
/// Set the view to use a LOD threshold.
void onLodThresholdChange(bool state, double defVal);
/// Set logarithmic color scaling on the data.
void onLogScale(int state);
/// Set the view to use a parallel projection.
Expand Down
21 changes: 21 additions & 0 deletions Code/Mantid/Vates/VatesSimpleGui/ViewWidgets/src/ViewBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,27 @@ void ViewBase::onParallelProjection(bool state)
cview->render();
}

/**
* This function is used to set the LOD threshold for the view.
* @param state : whether or not to use the LOD threshold
* @param defVal : default value of LOD threshold
*/
void ViewBase::onLodThresholdChange(bool state, double defVal)
{
pqRenderView *cview = this->getPvActiveView();
vtkSMProxy *proxy = cview->getProxy();
if (state)
{
vtkSMPropertyHelper(proxy, "LODThreshold").Set(defVal);
}
else
{
vtkSMPropertyHelper(proxy, "LODThreshold").Set(VTK_DOUBLE_MAX);
}
proxy->UpdateVTKObjects();
cview->render();
}

/**
* This function retrieves the active pqRenderView object according to
* ParaView's ActiveObjects mechanism.
Expand Down

0 comments on commit fda0724

Please sign in to comment.