@@ -339,7 +339,7 @@ def rename(self, path, oldValue,newValue):
339339 jupyter_geppetto .synched_models [newModel ]= synched_component
340340 with redirect_stdout (sys .__stdout__ ):
341341 if "popParams" in path :
342- pass
342+ self . propagate_field_rename ( "pop" , newValue , oldValue )
343343
344344 return 1
345345
@@ -393,7 +393,7 @@ def getAvailableCellModels(self):
393393 cm = self .netParams .popParams [p ]['cellModel' ]
394394 if cm not in cellModels :
395395 cellModels .add (cm )
396- return cellModels
396+ return list ( cellModels )
397397
398398 def getAvailableCellTypes (self ):
399399 cellTypes = set ([])
@@ -402,7 +402,7 @@ def getAvailableCellTypes(self):
402402 ct = self .netParams .popParams [p ]['cellType' ]
403403 if ct not in cellTypes :
404404 cellTypes .add (ct )
405- return cellTypes
405+ return list ( cellTypes )
406406
407407 def getAvailableSections (self ):
408408 sections = {}
@@ -432,15 +432,21 @@ def getAvailablePlots(self):
432432 return [plot for plot in plots if plot not in list (self .simConfig .analysis .keys ())]
433433
434434 def deleteParam (self , model , label ):
435- if isinstance (model , list ): # just for cellParams
436- if len (model )== 1 :
437- self .netParams .cellParams [model [0 ]]["secs" ].pop (label )
438- elif len (model )== 2 :
439- self .netParams .cellParams [model [0 ]]["secs" ][model [1 ]]["mechs" ].pop (label )
435+ try :
436+ if isinstance (model , list ): # just for cellParams
437+ if len (model )== 1 :
438+ self .netParams .cellParams [model [0 ]]["secs" ].pop (label )
439+ elif len (model )== 2 :
440+ self .netParams .cellParams [model [0 ]]["secs" ][model [1 ]]["mechs" ].pop (label )
441+ else :
442+ pass
440443 else :
441- pass
442- else :
443- getattr (self .netParams , model ).pop (label )
444+ getattr (self .netParams , model ).pop (label )
445+ if "popParams" in model :
446+ self .propagate_field_rename ("pop" , None , label )
447+ return True
448+ except :
449+ return False
444450
445451 def validateFunction (self , functionString ):
446452 return validateFunction (functionString , self .netParams .__dict__ )
0 commit comments