Don't close PROP and CUST dialogs when trying to validate empty strings

This commit is contained in:
Tamás Bálint Misius 2020-10-12 17:24:10 +02:00
parent 18dfd6de86
commit f57d503b41
No known key found for this signature in database
GPG Key ID: 5B472A12F6ECA9F2
2 changed files with 6 additions and 4 deletions

View File

@ -51,12 +51,12 @@ toolSelection(toolSelection)
okayButton->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
okayButton->Appearance.BorderInactive = ui::Colour(200, 200, 200);
okayButton->SetActionCallback({ [this] {
CloseActiveWindow();
if (nameField->GetText().length() && ruleField->GetText().length())
{
CloseActiveWindow();
Validate();
SelfDestruct();
}
SelfDestruct();
} });
AddComponent(okayButton);
SetOkayButton(okayButton);

View File

@ -57,10 +57,12 @@ sim(sim_)
okayButton->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
okayButton->Appearance.BorderInactive = ui::Colour(200, 200, 200);
okayButton->SetActionCallback({ [this] {
CloseActiveWindow();
if (textField->GetText().length())
{
CloseActiveWindow();
SetProperty();
SelfDestruct();
SelfDestruct();
}
} });
AddComponent(okayButton);
SetOkayButton(okayButton);