Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge to main for 1.7.0 #134

Merged
merged 2 commits into from
Jan 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion plugin/openstudio/lib/interfaces/ModelInterface.rb
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,17 @@ def attach_openstudio_model()
end

# Sort the drawing interfaces according to the "draw order".
drawing_interfaces.sort! { |a, b| @draw_order.index(a.class) <=> @draw_order.index(b.class) }
drawing_interfaces.sort! do |a, b|
result = @draw_order.index(a.class) <=> @draw_order.index(b.class)
if result == 0
# class specific sorting
if a.is_a?(PlanarSurface)
result = b.model_object.grossArea.to_f <=> a.model_object.grossArea.to_f
end
end

result
end

# Reattach drawing interfaces and entities.
for drawing_interface in drawing_interfaces
Expand Down
Loading