mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
OnlineUnlockForm: Fix scope of AlertWindow so that it outlives the OverlayComp
This commit is contained in:
parent
3540152d71
commit
aec8617f59
2 changed files with 9 additions and 5 deletions
|
|
@ -102,15 +102,19 @@ struct OnlineUnlockForm::OverlayComp : public Component,
|
|||
{
|
||||
auto options = MessageBoxOptions::makeOptionsOk (MessageBoxIconType::WarningIcon,
|
||||
TRANS ("Registration Failed"),
|
||||
result.errorMessage);
|
||||
messageBox = AlertWindow::showScopedAsync (options, nullptr);
|
||||
result.errorMessage,
|
||||
{},
|
||||
&form);
|
||||
form.messageBox = AlertWindow::showScopedAsync (options, nullptr);
|
||||
}
|
||||
else if (result.informativeMessage.isNotEmpty())
|
||||
{
|
||||
auto options = MessageBoxOptions::makeOptionsOk (MessageBoxIconType::InfoIcon,
|
||||
TRANS ("Registration Complete!"),
|
||||
result.informativeMessage);
|
||||
messageBox = AlertWindow::showScopedAsync (options, nullptr);
|
||||
result.informativeMessage,
|
||||
{},
|
||||
&form);
|
||||
form.messageBox = AlertWindow::showScopedAsync (options, nullptr);
|
||||
}
|
||||
else if (result.urlToLaunch.isNotEmpty())
|
||||
{
|
||||
|
|
@ -145,7 +149,6 @@ struct OnlineUnlockForm::OverlayComp : public Component,
|
|||
Spinner spinner;
|
||||
OnlineUnlockStatus::UnlockResult result;
|
||||
String email, password;
|
||||
ScopedMessageBox messageBox;
|
||||
|
||||
std::unique_ptr<TextButton> cancelButton;
|
||||
|
||||
|
|
|
|||
|
|
@ -87,6 +87,7 @@ private:
|
|||
|
||||
struct OverlayComp;
|
||||
friend struct OverlayComp;
|
||||
ScopedMessageBox messageBox;
|
||||
Component::SafePointer<Component> unlockingOverlay;
|
||||
|
||||
void buttonClicked (Button*) override;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue