From dd0db4ed30952e1ad7b4bce849b015025bf49152 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Mon, 11 Apr 2016 21:09:01 +0000
Subject: [PATCH] setChoiceLabels should clear the map

---
 Common/onelab.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Common/onelab.h b/Common/onelab.h
index 2c27558dc7..5d946c8544 100644
--- a/Common/onelab.h
+++ b/Common/onelab.h
@@ -381,6 +381,7 @@ namespace onelab{
     void setChoiceLabels(const std::vector<std::string> &labels)
     {
       if(labels.size() != _choices.size()) return;
+      if(_valueLabels.size()) _valueLabels.clear();
       for(unsigned int i = 0; i < _choices.size(); i++)
         _valueLabels[_choices[i]] = labels[i];
     }
-- 
GitLab