Skip to content

Commit 4aa29a0

Browse files
Merge pull request #2214 from SciML/bgc/gui_fix
fix breaking changes to ModelingToolkitDesigner.jl
2 parents b865ff2 + 6636398 commit 4aa29a0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/systems/model_parsing.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ function connector_macro(mod, name, body)
4848
error("$name doesn't have a independent variable")
4949
end
5050
gui_metadata = isassigned(icon) ? GUIMetadata(GlobalRef(mod, name), icon[]) :
51-
nothing
51+
GUIMetadata(GlobalRef(mod, name))
52+
5253
quote
5354
$name = $Model((; name, $(kwargs...)) -> begin
5455
$expr
@@ -229,7 +230,7 @@ function mtkmodel_macro(mod, name, expr)
229230
end
230231

231232
gui_metadata = isassigned(icon) > 0 ? GUIMetadata(GlobalRef(mod, name), icon[]) :
232-
nothing
233+
GUIMetadata(GlobalRef(mod, name))
233234

234235
sys = :($ODESystem($Equation[$(eqs...)], $iv, [$(vs...)], [$(ps...)];
235236
systems = [$(comps...)], name, gui_metadata = $gui_metadata)) #, defaults = $defaults))

0 commit comments

Comments
 (0)