Archived
1
0

Issue #13: Fixing bug in kll compiler when not setting any DefaultMap or PartialMap

- Recent change broke this functionality
This commit is contained in:
Jacob Alexander 2015-02-20 23:43:33 -08:00
parent 25043fa0ee
commit b7a8979864

View File

@ -106,12 +106,15 @@ class Backend:
partialLayersInfo = "" partialLayersInfo = ""
for file, name in zip( variables.baseLayout['*LayerFiles'], variables.baseLayout['*NameStack'] ): for file, name in zip( variables.baseLayout['*LayerFiles'], variables.baseLayout['*NameStack'] ):
baseLayoutInfo += "// {0}\n// {1}\n".format( name, file ) baseLayoutInfo += "// {0}\n// {1}\n".format( name, file )
for file, name in zip( variables.layerVariables[0]['*LayerFiles'], variables.layerVariables[0]['*NameStack'] ): if '*LayerFiles' in variables.layerVariables[0].keys():
defaultLayerInfo += "// {0}\n// {1}\n".format( name, file ) for file, name in zip( variables.layerVariables[0]['*LayerFiles'], variables.layerVariables[0]['*NameStack'] ):
for layer in range( 1, len( variables.layerVariables ) ): defaultLayerInfo += "// {0}\n// {1}\n".format( name, file )
partialLayersInfo += "// Layer {0}\n".format( layer ) if '*LayerFiles' in variables.layerVariables[1].keys():
for file, name in zip( variables.layerVariables[ layer ]['*LayerFiles'], variables.layerVariables[ layer ]['*NameStack'] ): for layer in range( 1, len( variables.layerVariables ) ):
partialLayersInfo += "// {0}\n// {1}\n".format( name, file ) partialLayersInfo += "// Layer {0}\n".format( layer )
if len( variables.layerVariables[ layer ]['*LayerFiles'] ) > 0:
for file, name in zip( variables.layerVariables[ layer ]['*LayerFiles'], variables.layerVariables[ layer ]['*NameStack'] ):
partialLayersInfo += "// {0}\n// {1}\n".format( name, file )
## Information ## ## Information ##
@ -319,9 +322,10 @@ class Backend:
# Generate stacked name # Generate stacked name
stackName = "" stackName = ""
for name in range( 0, len( variables.layerVariables[ layer ]['*NameStack'] ) ): if '*NameStack' in variables.layerVariables[ layer ].keys():
stackName += "{0} + ".format( variables.layerVariables[ layer ]['*NameStack'][ name ] ) for name in range( 0, len( variables.layerVariables[ layer ]['*NameStack'] ) ):
stackName = stackName[:-3] stackName += "{0} + ".format( variables.layerVariables[ layer ]['*NameStack'][ name ] )
stackName = stackName[:-3]
# Default map is a special case, always the first index # Default map is a special case, always the first index
if layer == 0: if layer == 0: