Commit 20109046 authored by j_stru18's avatar j_stru18

show assigned layers for hdf5txt files as well

parent 0657a8cc
......@@ -771,7 +771,7 @@ class InputManager(QtWidgets.QWidget):
# - use relative paths for the dbs in the dict
# - assign a reference to the layer to get the path at runtime from the input manager
# get type an path
# get type and path
type = self.dict["dblist"][id]["type"]
path = self.dict["dblist"][id]["path"]
......@@ -1038,7 +1038,6 @@ class InputManager(QtWidgets.QWidget):
for _, layername, assigned in mylayer:
if assigned:
usedBy += layername + ", "
if usedBy is "":
self.setUsage("no layer assigned")
else:
......
......@@ -83,7 +83,8 @@ class LayerHelper:
"""
mylayer = []
for nid in network["layerOrder"]:
if network["layers"][nid]["type"].name() in layertypes:
type = network["layers"][nid]["type"].name()
if type in layertypes:
params = network["layers"][nid]["parameters"]
layername = params["name"]
# since names can be ambiguous append the phase
......@@ -92,8 +93,9 @@ class LayerHelper:
if unicode("phase") in incl:
layername += " (" + incl["phase"] + ")"
same = False
if unicode("data_param") in params and unicode("source") in params["data_param"]:
layerpath = params["data_param"]["source"]
dataParamType = "hdf5_data_param" if type == "HDF5Data" else "data_param"
if unicode(dataParamType) in params and unicode("source") in params[dataParamType]:
layerpath = params[dataParamType]["source"]
same = (os.path.realpath(dbpath) == os.path.realpath(layerpath))
mylayer.append([nid, layername, same])
return mylayer
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment