diff --git a/src/GEOM/GEOM_Engine.cxx b/src/GEOM/GEOM_Engine.cxx index 368323d22..bad944c95 100644 --- a/src/GEOM/GEOM_Engine.cxx +++ b/src/GEOM/GEOM_Engine.cxx @@ -745,7 +745,7 @@ TCollection_AsciiString GEOM_Engine::DumpPython(int theDocID, globalVars += ", "; globalVars += data->_pyName; } - if ( !globalVars.IsEmpty() ) { + if ( isMultiFile && !globalVars.IsEmpty() ) { globalVars.Insert( 1, "\n\tglobal " ); aScript.Insert( posToInsertGlobalVars, globalVars ); }