Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use empty() to check for emptiness. #6

Open
wants to merge 16 commits into
base: next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Applications/ParaView/ParaViewFilters.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
</Category>

<Category name="CosmoTools" menu_label="&amp;CosmoTools" show_in_toolbar="0">
<Proxy group="filters" name="ANLHaloFinder" />
<Proxy group="filters" name="ANLSubhaloFinder" />
<Proxy group="filters" name="LANLHaloFinder" />
<Proxy group="filters" name="MinkowskiFilter" />
<Proxy group="filters" name="PMergeConnected" />
Expand Down
6 changes: 6 additions & 0 deletions CoProcessing/Catalyst/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ if (CMAKE_Fortran_COMPILER_WORKS)
${CMAKE_CURRENT_BINARY_DIR}/FortranAdaptorAPIMangling.h)
endif()

if (PARAVIEW_USE_MPI)
# this needs to be done before the vtk_module_library() since
# vtkMPI has add_definitions() call it in.
include(vtkMPI)
endif()

vtk_module_library(${vtk-module} ${Module_SRCS})
if(PARAVIEW_USE_MPI)
vtk_mpi_link(${vtk-module})
Expand Down
29 changes: 12 additions & 17 deletions ParaViewCore/ServerManager/Core/vtkSMSettings.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ class vtkSMSettings::vtkSMSettingsInternal {
if (hasInt)
{
property->SetElement(0, enumValue);
return true;
}
else
{
Expand All @@ -245,29 +246,23 @@ class vtkSMSettings::vtkSMSettingsInternal {
{
enumValue = enumDomain->GetEntryValueForText(stringValue.c_str());
property->SetElement(0, enumValue);
return true;
}
}
}
else
std::vector<int> vector;
if (!this->GetSetting(settingName, vector) ||
vector.size() != property->GetNumberOfElements())
{
std::vector<int> vector;
if (!this->GetSetting(settingName, vector) ||
vector.size() != property->GetNumberOfElements())
{
return false;
}
else if (property->GetRepeatable())
{
property->SetNumberOfElements(static_cast<unsigned int>(vector.size()));
}
else if (vector.size() != property->GetNumberOfElements())
{
return false;
}

property->SetElements(&vector[0]);
return false;
}
if (property->GetRepeatable())
{
property->SetNumberOfElements(static_cast<unsigned int>(vector.size()));
}

property->SetElements(&vector[0]);

return true;
}

Expand Down
2 changes: 2 additions & 0 deletions ParaViewCore/ServerManager/Default/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@
</Documentation>
<BooleanDomain name="bool" />
<Hints>
<SaveInQSettings both="1" />
<RestartRequired />
</Hints>
</IntVectorProperty>
Expand All @@ -176,6 +177,7 @@
</Documentation>
<IntRangeDomain min="1" max="64" />
<Hints>
<SaveInQSettings both="1" />
<RestartRequired />
</Hints>
</IntVectorProperty>
Expand Down
2 changes: 2 additions & 0 deletions ParaViewCore/VTKExtensions/CosmoTools/module.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ set_property(GLOBAL PROPERTY

## CosmoTools Filters
${CMAKE_CURRENT_LIST_DIR}/resources/LANLHaloFinder.xml
${CMAKE_CURRENT_LIST_DIR}/resources/ANLHaloFinder.xml
${CMAKE_CURRENT_LIST_DIR}/resources/ANLSubHaloFinder.xml
${CMAKE_CURRENT_LIST_DIR}/resources/MergeConnected.xml
${CMAKE_CURRENT_LIST_DIR}/resources/MinkowskiFilter.xml
)
Loading