From eb07b340d03fd5749205490c766020b59d740e98 Mon Sep 17 00:00:00 2001 From: Marc Schmitzer Date: Mon, 28 Nov 2011 15:43:28 -0800 Subject: Clear script in curExecContext after applying it to a transition in QScxmlLoader::loadState(). Without this change, the script is also applied to the state containing the transition in line 1502 if the state sources an external scxml file (via the "src") attribute. In that case, the next element processed by the parser is the closing if the transition containing the script is the last in the file. Maybe this should better be fixed in the block starting at line 1499, but clearing the script *after* applying it somewhere seems safe enough. Merge-request: 3 Reviewed-by: No'am Rosenthal --- src/qscxml.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qscxml.cpp b/src/qscxml.cpp index ec78f9a..c44e135 100644 --- a/src/qscxml.cpp +++ b/src/qscxml.cpp @@ -1507,6 +1507,7 @@ void QScxmlLoader::loadState ( curExecContext.trans = curTransition; curExecContext.type = ScExecContext::Transition; curExecContext.applyScript(); + curExecContext.script = ""; } curExecContext.type = ScExecContext::None; } else if (r.name().toString().compare("invoke",Qt::CaseInsensitive) == 0) { -- cgit v1.2.3