Skip to content

Commit

Permalink
Merge pull request #2214 from SciML/bgc/gui_fix
Browse files Browse the repository at this point in the history
fix breaking changes to ModelingToolkitDesigner.jl
  • Loading branch information
ChrisRackauckas authored Jul 24, 2023
2 parents b865ff2 + 6636398 commit 4aa29a0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/systems/model_parsing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ function connector_macro(mod, name, body)
error("$name doesn't have a independent variable")
end
gui_metadata = isassigned(icon) ? GUIMetadata(GlobalRef(mod, name), icon[]) :
nothing
GUIMetadata(GlobalRef(mod, name))

quote
$name = $Model((; name, $(kwargs...)) -> begin
$expr
Expand Down Expand Up @@ -229,7 +230,7 @@ function mtkmodel_macro(mod, name, expr)
end

gui_metadata = isassigned(icon) > 0 ? GUIMetadata(GlobalRef(mod, name), icon[]) :
nothing
GUIMetadata(GlobalRef(mod, name))

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

0 comments on commit 4aa29a0

Please sign in to comment.