itwinjs-core
itwinjs-core copied to clipboard
Contour Display in Section Drawings does not always work
Describe the bug Contour Display does not always work in spatial view of the SectionDrawing. This was found during during the testing of this issue in our local test app.
To Reproduce Steps to reproduce the behavior:
- While viewing a spatial view, navigate to a DrawingViewDefinition of a section drawing with contour display data.
- App loads a ViewState from the DrawingViewDefinition
- Calls
viewport.changeViewwith new ViewState - (Using a breakpoint), observe the viewstate loaded with contour display data and is rendered as expected in the viewport (a section drawing with the contour lines visible).
- A sub-system in our app detects that the viewport is viewing a 2d view while on the "3d frontstage".
- It saves the viewstate, swaps frontstages to the "2d frontstage" which triggers another viewport to be created.
- It then recalls the saved viewstate as the initial view for the new viewport.
- Observe the viewstate is the same as in the "3d fronstage," but the contour lines are not visible in the section drawing.
- Navigate to another DrawingViewDefinition of a section drawing with contour data that does not trigger the sub-system and creates another viewport.
- Observe the contour lines are not visible in the section drawing.
Expected behavior I would expect the SectionDrawings to always show Contour Display when the spatial view the associated with the SectionDrawing defines it.
Desktop (please complete the applicable information):
- OS: windows 11
- @itwin/core-frontend 5.1.8
Additional context Add any other context about the problem here.