Commit 5a4c712c authored by Utkarsh Ayachit's avatar Utkarsh Ayachit Committed by Kitware Robot
Browse files

Merge topic 'color-preset-annotation-tweak'

a52bdc63 Use data values for annotations when preset empty.
e57cb5e8 Don't erase existing annotations for empty preset.
parents 4e259972 a52bdc63
......@@ -1362,12 +1362,21 @@ void pqColorScaleEditor::loadPreset()
this->setInterpretation( indexedLookup ? PQ_INTERPRET_CATEGORY : PQ_INTERPRET_INTERVAL );
// Annotations: Update the proxy
this->Form->InSetAnnotation = true;
QList<QVariant> annotations = colorMap->getAnnotations();
this->ColorMap->setAnnotations( annotations );
this->Form->InSetAnnotation = false;
// Annotations: Update the GUI via the proxy
this->handleAnnotationsChanged();
// Only change the annotations if the preset has some.
// Otherwise, keep the current set of annotations.
if (annotations.size() > 0)
{
this->Form->InSetAnnotation = true;
this->ColorMap->setAnnotations(annotations);
this->Form->InSetAnnotation = false;
// Annotations: Update the GUI via the proxy
this->handleAnnotationsChanged();
}
else
{
this->addActiveValues();
}
// Update the actual color map.
this->Form->IgnoreEditor = false;
......
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