Commit 30ec5eb0 authored by Utkarsh Ayachit's avatar Utkarsh Ayachit

Adding test to test resetting to visible range.

Change-Id: Ib4ec7037fe8d894805db33c0dddaeb3a69956d7e
parent c161dd14
......@@ -82,6 +82,7 @@ SET (TESTS_WITH_INLINE_COMPARES
${CMAKE_CURRENT_SOURCE_DIR}/MemoryInspectorPanel.xml
${CMAKE_CURRENT_SOURCE_DIR}/NonlinearSubdivisionDisplay.xml
${CMAKE_CURRENT_SOURCE_DIR}/RenderNan.xml
${CMAKE_CURRENT_SOURCE_DIR}/ResetToVisibleRange.xml
${CMAKE_CURRENT_SOURCE_DIR}/SaveLargeScreenshot.xml
${CMAKE_CURRENT_SOURCE_DIR}/SLACTools.xml
${CMAKE_CURRENT_SOURCE_DIR}/TestIsoVolume.xml
......@@ -542,6 +543,9 @@ SET(HistogramSelection_THRESHOLD 40)
# tends to render slightly differently.
set (LoadStateMultiView_THRESHOLD 20)
# Selection not supported in CRS and is needed for this test.
set (ResetToVisibleRange_DISABLE_CRS TRUE)
##########################################################
# List of known incompatible tests for Collaboration
#
......
<?xml version="1.0" ?>
<pqevents>
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menuSources" />
<pqevent object="pqClientMainWindow/menubar/menuSources" command="activate" arguments="SphereSource" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/ThetaResolution/LineEdit0" command="set_string" arguments="80" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/PhiResolution/LineEdit0" command="set_string" arguments="80" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menuFilters" />
<pqevent object="pqClientMainWindow/menubar/menuFilters/Alphabetical" command="activate" arguments="ElevationFilter" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/cameraToolbar/actionPositiveY" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/variableToolbar/actionScalarBarVisibility" command="set_boolean" arguments="false" />
<pqevent object="pqClientMainWindow/variableToolbar/actionRescaleVisibleRange" command="activate" arguments="" />
<pqcompareview object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/Viewport" baseline="$PARAVIEW_DATA_ROOT/Baseline/ResetToVisibleRangeA.png" width="300" height="300" />
<pqevent object="pqClientMainWindow/cameraToolbar/actionPositiveY" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/cameraToolbar" command="mouseMove" arguments="1,0,0,242,36" />
<pqevent object="pqClientMainWindow/cameraToolbar" command="mouseRelease" arguments="1,0,0,242,36" />
<pqevent object="pqClientMainWindow/cameraToolbar/actionNegativeY" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/variableToolbar/actionRescaleVisibleRange" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/1pq3DWidgetPropertyWidget0/pqLineWidget/point1X" command="set_string" arguments="0" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/1pq3DWidgetPropertyWidget0/pqLineWidget/point1Y" command="key" arguments="16777217" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/1pq3DWidgetPropertyWidget0/pqLineWidget/point1Y" command="set_string" arguments="0" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/1pq3DWidgetPropertyWidget0/pqLineWidget/point1Z" command="key" arguments="16777217" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/1pq3DWidgetPropertyWidget0/pqLineWidget/point2X" command="key" arguments="16777217" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/1pq3DWidgetPropertyWidget0/pqLineWidget/point2X" command="set_string" arguments="0" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/1pq3DWidgetPropertyWidget0/pqLineWidget/point2Y" command="key" arguments="16777217" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/1pq3DWidgetPropertyWidget0/pqLineWidget/point2Y" command="set_string" arguments="0" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/1pq3DWidgetPropertyWidget0/pqLineWidget/point2Z" command="key" arguments="16777217" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/variableToolbar/actionRescaleVisibleRange" command="activate" arguments="" />
<pqcompareview object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/Viewport" baseline="$PARAVIEW_DATA_ROOT/Baseline/ResetToVisibleRangeB.png" width="300" height="300" />
<pqevent object="pqClientMainWindow/cameraToolbar/actionPositiveZ" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/variableToolbar/actionRescaleVisibleRange" command="activate" arguments="" />
<pqcompareview object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/Viewport" baseline="$PARAVIEW_DATA_ROOT/Baseline/ResetToVisibleRangeC.png" width="300" height="300" />
<pqevent object="pqClientMainWindow/cameraToolbar/actionPositiveX" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menuFilters" />
<pqevent object="pqClientMainWindow/menubar/menuFilters/Alphabetical" command="activate" arguments="PointDataToCellData" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/variableToolbar/actionRescaleVisibleRange" command="activate" arguments="" />
<pqcompareview object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/Viewport" baseline="$PARAVIEW_DATA_ROOT/Baseline/ResetToVisibleRangeD.png" width="300" height="300" />
<pqevent object="pqClientMainWindow/cameraToolbar/actionNegativeZ" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/variableToolbar/actionRescaleVisibleRange" command="activate" arguments="" />
<pqcompareview object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/Viewport" baseline="$PARAVIEW_DATA_ROOT/Baseline/ResetToVisibleRangeE.png" width="300" height="300" />
</pqevents>
......@@ -966,6 +966,12 @@ bool vtkSMRenderViewProxy::ComputeVisibleScalarRange(
int component,
double range[])
{
if (!this->IsSelectionAvailable())
{
vtkErrorMacro("Cannot ComputeVisibleScalarRange since surface selection is currently "
"unsupported.");
return false;
}
bool multiple_selections = true;
range[0] = VTK_DOUBLE_MAX;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment