Skip to content

Commit

Permalink
BUG #16020: restore defaults for repeatable vector properties
Browse files Browse the repository at this point in the history
Repeatable vector properties were not being restored when
vtkSMProperty::RestoreToXMLDefaults() was called because no defaults
for such properties are typically defined in the proxy XML. This patch
handles this case by clearing out the vector elements, setting the
size to zero.
  • Loading branch information
cquammen committed Mar 10, 2016
1 parent ad11756 commit 743036c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ParaViewCore/ServerManager/Core/vtkSMVectorPropertyTemplate.h
Expand Up @@ -318,6 +318,13 @@ class vtkSMVectorPropertyTemplate
this->Property->Modified();
this->ClearUncheckedElements();
}
else if (this->Property->GetRepeatable())
{
this->Values.clear();
this->Initialized = true;
this->Property->Modified();
this->ClearUncheckedElements();
}
}

//---------------------------------------------------------------------------
Expand Down

0 comments on commit 743036c

Please sign in to comment.