Skip to content

Commit baa3f8a

Browse files
authored
Merge pull request #129 from MetaCell/feature/127
Use redux
2 parents 8482174 + 5cf958a commit baa3f8a

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,6 @@ netpyne/
99
org.geppetto.frontend.jupyter/
1010
*.ipynb
1111
init.py
12-
.vscode
12+
npm*
13+
.vscode
14+
app.log

netpyne_ui/netpyne_geppetto.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -496,10 +496,14 @@ def deleteParam(self, model, label):
496496
else:
497497
pass
498498
else:
499-
getattr(self.netParams, model).pop(label)
499+
population = getattr(self.netParams, model).pop(label)
500500
if "popParams" in model:
501501
self.propagate_field_rename("pop", None, label)
502+
self.propagate_field_rename("cellModel", None, population['cellModel'])
503+
self.propagate_field_rename("cellType", None, population['cellType'])
504+
502505
elif "stimSourceParams" in model:
506+
503507
self.propagate_field_rename("source", None, label)
504508
elif "synMechParams" in model:
505509
self.propagate_field_rename("synMech", None, label)
@@ -611,7 +615,7 @@ def unique(label=label, old=old):
611615
for p in self.netParams.popParams:
612616
if label in self.netParams.popParams[p]:
613617
classes.append(self.netParams.popParams[p][label])
614-
if classes.count(old)>1:
618+
if classes.count(old) > 0:
615619
return False
616620
else:
617621
return True
@@ -623,7 +627,7 @@ def unique(label=label, old=old):
623627
self.propagate_syn_mech_rename(new, old)
624628
return True
625629
else:
626-
if unique():
630+
if unique():
627631
for (model, cond) in [['cellParams','conds'], ['connParams', 'preConds'], ['connParams', 'postConds'], ['stimTargetParams', 'conds'], ['analysis', 'include'] ]:
628632
self.propagate(model, label, cond, new, old)
629633
return True

0 commit comments

Comments
 (0)