Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/frontend/StarErrorScreen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/frontend/StarErrorScreen.cpp')
-rw-r--r--source/frontend/StarErrorScreen.cpp10
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() {