Commit e57cb5e8 authored by David Thompson's avatar David Thompson
Browse files

Don't erase existing annotations for empty preset.

Change-Id: I8533d10790ac2aa3faab9b9f46f893a3805ba3fd
parent 4a1d587e
......@@ -1362,12 +1362,17 @@ 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 );
// 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();
}
// 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