defocus components removed from scrollpanels, to prevent crashes
This commit is contained in:
parent
17302f03c7
commit
f814d264b2
@ -82,6 +82,8 @@ void Panel::RemoveChild(Component* c)
|
||||
{
|
||||
//remove child from parent. Does not free memory
|
||||
children.erase(children.begin() + i);
|
||||
if (this->GetParentWindow()->IsFocused(c))
|
||||
this->GetParentWindow()->FocusComponent(NULL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -48,6 +48,7 @@ LocalSaveActivity::LocalSaveActivity(SaveFile save, FileSavedCallback * callback
|
||||
filenameField->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
|
||||
filenameField->Appearance.HorizontalAlign = ui::Appearance::AlignLeft;
|
||||
AddComponent(filenameField);
|
||||
FocusComponent(filenameField);
|
||||
|
||||
ui::Button * cancelButton = new ui::Button(ui::Point(0, Size.Y-16), ui::Point(Size.X-75, 16), "Cancel");
|
||||
cancelButton->Appearance.HorizontalAlign = ui::Appearance::AlignLeft;
|
||||
|
Loading…
Reference in New Issue
Block a user