From 86d2128a7f9f977c1bfeea7e826744ea9b337c0e Mon Sep 17 00:00:00 2001 From: Thomas Purdy Date: Thu, 17 Aug 2023 15:46:35 -0600 Subject: [PATCH] Fixed a typo in set_sname! definition preventing it from working correctly --- src/StockFlow.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/StockFlow.jl b/src/StockFlow.jl index ac04d70e..3665ad51 100644 --- a/src/StockFlow.jl +++ b/src/StockFlow.jl @@ -570,7 +570,7 @@ set_pnames!(p::AbstractStockAndFlowStructure, names) = set_subpart!(p, :pname, n # Could pull out the right side into another function -set_sname!(p::AbstractStockAndFlow0, index, newname) = set_subpart!(p, :sname, [i == index ? newname : prevnames for (i, prevnames) in enumerate(vnames(p))]) +set_sname!(p::AbstractStockAndFlow0, index, newname) = set_subpart!(p, :sname, [i == index ? newname : prevnames for (i, prevnames) in enumerate(snames(p))]) set_fname!(p::AbstractStockAndFlowStructure, index, newname) = set_subpart!(p, :fname, [i == index ? newname : prevnames for (i, prevnames) in enumerate(fnames(p))]) set_svname!(p::AbstractStockAndFlow0, index, newname) = set_subpart!(p, :svname, [i == index ? newname : prevnames for (i, prevnames) in enumerate(svnames(p))]) set_vname!(p::AbstractStockAndFlowStructure, index, newname) = set_subpart!(p, :vname, [i == index ? newname : prevnames for (i, prevnames) in enumerate(vnames(p))])