diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-06-27 01:22:09 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-06-27 01:22:09 +1000 |
commit | 14e23a17ccf7d556d98e7dc76f1e7ad81fa70e93 (patch) | |
tree | b4c590d91eedc9baf30d54de5d5ae89b5a3b2e81 /source/frontend | |
parent | 4e6e342169e2dc8f86960bc31840e3a3b281814a (diff) |
fix ErrorScreen pane never coming back after closing the first error
Diffstat (limited to 'source/frontend')
-rw-r--r-- | source/frontend/StarErrorScreen.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source/frontend/StarErrorScreen.cpp b/source/frontend/StarErrorScreen.cpp index 6367d05..c5d207e 100644 --- a/source/frontend/StarErrorScreen.cpp +++ b/source/frontend/StarErrorScreen.cpp @@ -24,15 +24,17 @@ ErrorScreen::ErrorScreen() { m_accepted = true; }); reader.construct(assets->json("/interface/windowconfig/error.config:paneLayout"), m_errorPane.get()); - - m_paneManager->displayPane(PaneLayer::Window, m_errorPane, [this](PanePtr) { - m_accepted = true; - }); } void ErrorScreen::setMessage(String const& errorMessage) { m_errorPane->fetchChild<LabelWidget>("labelError")->setText(errorMessage); m_accepted = false; + + if (!m_paneManager->isDisplayed(m_errorPane)) { + m_paneManager->displayPane(PaneLayer::Window, m_errorPane, [this](PanePtr) { + m_accepted = true; + }); + } } bool ErrorScreen::accepted() { |