Commit 83c41090 authored by j_stru18's avatar j_stru18

Merge branch 'bugfix/463_HDF5TXT_cannot_be_assigned' into develop

parents dbadc8a2 20109046
......@@ -819,7 +819,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"]
......@@ -836,7 +836,7 @@ class InputManager(QtWidgets.QWidget):
if len(mylayer) == 0:
# no layer of this type
QtWidgets.QMessageBox.warning(self, type, "There are no Layer of this Type")
QtWidgets.QMessageBox.warning(self, type, "There is no layer of this type.")
return
# get the selected layers
......@@ -1086,7 +1086,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
......@@ -91,10 +92,12 @@ class LayerHelper:
for incl in params["include"]:
if unicode("phase") in incl:
layername += " (" + incl["phase"] + ")"
if unicode("data_param") in params and unicode("source") in params["data_param"]:
layerpath = params["data_param"]["source"]
same = False
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])
mylayer.append([nid, layername, same])
return mylayer
@staticmethod
......
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