iTwin / appui

Monorepo for iTwin.js AppUi
MIT License
9 stars 2 forks source link

FronstageDef.restoreLayout does not restore the layout when there is no active frontstage #1088

Closed DaumantasJankauskas closed 3 weeks ago

DaumantasJankauskas commented 4 weeks ago

Describe the bug

FronstageDef.restoreLayout() does not restore the layout when there is no active frontstage. From what I understand, this happens because the InternalFrontstageManager.onFrontstageRestoreLayoutEvent listener is only active when there is an active frontstage.

To Reproduce

No response

Expected Behavior

No response

Screenshots

No response

Desktop (please complete the applicable information)

Additional context

Some additional context why this is an issue for us:

In our use case we restore the layout from the settings route - meaning there is no active frontstage at the time. Currently to achieve that we use internal functions, which we are trying to remove, the only public alternative that I found was FronstageDef.restoreLayout.