Skip to content

Conversation

@DrPaulSharp
Copy link
Collaborator

@DrPaulSharp DrPaulSharp commented Sep 29, 2025

Fixes #419

This PR fixes the bug that occurs where a contract containing no layers is viewed as a single layer of zero thickness. This was introduced in the routine groupLayersMod, where it was necessary to ensure outputLayers was defined on all branches of the if statement. By replacing the line of zeros with an appropriately sized empty array, we retain all code functionality, ensuring the following routines, applyHydration and makeSLDProfile, behave as expected when there are no layers. I have also confirmed that the plot looks as we expect with this change.

@arwelHughes this PR means there is no need to add the check to makeSLDProfile that we discussed this morning.

@arwelHughes
Copy link
Collaborator

arwelHughes commented Sep 30, 2025 via email

Copy link
Collaborator

@StephenNneji StephenNneji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

look good, thanks for the simple fix

@DrPaulSharp DrPaulSharp merged commit a7cd422 into master Sep 30, 2025
5 checks passed
@DrPaulSharp DrPaulSharp deleted the bugfix branch October 3, 2025 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix gap in plot when no layers are added

4 participants