Don't close PROP and CUST dialogs when trying to validate empty strings
This commit is contained in:
parent
18dfd6de86
commit
f57d503b41
@ -51,12 +51,12 @@ toolSelection(toolSelection)
|
|||||||
okayButton->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
|
okayButton->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
|
||||||
okayButton->Appearance.BorderInactive = ui::Colour(200, 200, 200);
|
okayButton->Appearance.BorderInactive = ui::Colour(200, 200, 200);
|
||||||
okayButton->SetActionCallback({ [this] {
|
okayButton->SetActionCallback({ [this] {
|
||||||
CloseActiveWindow();
|
|
||||||
if (nameField->GetText().length() && ruleField->GetText().length())
|
if (nameField->GetText().length() && ruleField->GetText().length())
|
||||||
{
|
{
|
||||||
|
CloseActiveWindow();
|
||||||
Validate();
|
Validate();
|
||||||
}
|
|
||||||
SelfDestruct();
|
SelfDestruct();
|
||||||
|
}
|
||||||
} });
|
} });
|
||||||
AddComponent(okayButton);
|
AddComponent(okayButton);
|
||||||
SetOkayButton(okayButton);
|
SetOkayButton(okayButton);
|
||||||
|
@ -57,10 +57,12 @@ sim(sim_)
|
|||||||
okayButton->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
|
okayButton->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
|
||||||
okayButton->Appearance.BorderInactive = ui::Colour(200, 200, 200);
|
okayButton->Appearance.BorderInactive = ui::Colour(200, 200, 200);
|
||||||
okayButton->SetActionCallback({ [this] {
|
okayButton->SetActionCallback({ [this] {
|
||||||
CloseActiveWindow();
|
|
||||||
if (textField->GetText().length())
|
if (textField->GetText().length())
|
||||||
|
{
|
||||||
|
CloseActiveWindow();
|
||||||
SetProperty();
|
SetProperty();
|
||||||
SelfDestruct();
|
SelfDestruct();
|
||||||
|
}
|
||||||
} });
|
} });
|
||||||
AddComponent(okayButton);
|
AddComponent(okayButton);
|
||||||
SetOkayButton(okayButton);
|
SetOkayButton(okayButton);
|
||||||
|
Loading…
Reference in New Issue
Block a user