From 213b67976de6d90c48a9a13b7d006e2e3a4d874d Mon Sep 17 00:00:00 2001
From: Yngve Inntjore Levinsen <Yngve.Levinsen@esss.se>
Date: Thu, 26 May 2016 16:28:44 +0200
Subject: [PATCH] I had made a mistake with FIELD_MAP_PATH, I think this should
 be correct Ryoichi noticed the issue

---
 ess/lib_tw.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/ess/lib_tw.py b/ess/lib_tw.py
index 681ea38..14548c5 100644
--- a/ess/lib_tw.py
+++ b/ess/lib_tw.py
@@ -79,10 +79,13 @@ class LATTICE:
                         para=lin.split()[1:]
                     # Map to a class
                     if   typ == 'FIELD_MAP'      : lst.append(   FIELD_MAP(name,typ,para,dic_fmap))
-                    elif typ == 'FIELD_MAP_PATH' : _update_field_map_dict(dic_fmap,para[0])
                     elif typ in dic_cls.keys()   : lst.append(dic_cls[typ](name,typ,para)         )
                     elif 'DIAG' in typ           : lst.append(        DIAG(name,typ,para)         )
                     else                         : lst.append(        COMM(name,typ,para)         )
+
+                    # in case of field map path, update dictionary with new path
+                    if typ == 'FIELD_MAP_PATH' : _update_field_map_dict(dic_fmap,para[0])
+
                     # Break the loop
                     if typ=='END': break
 
-- 
GitLab