BCardLayout: make the first item visible.
Change-Id: I7b836a22bc5c281bec9b44859c42fec56af45574 Reviewed-on: https://review.haiku-os.org/c/haiku/+/2683 Reviewed-by: Andrew Lindesay <apl@lindesay.co.nz>
This commit is contained in:
parent
451cf86feb
commit
d5a3eb04ef
@ -270,6 +270,9 @@ BCardLayout::Instantiate(BMessage* from)
|
|||||||
bool
|
bool
|
||||||
BCardLayout::ItemAdded(BLayoutItem* item, int32 atIndex)
|
BCardLayout::ItemAdded(BLayoutItem* item, int32 atIndex)
|
||||||
{
|
{
|
||||||
|
if (CountItems() <= 1)
|
||||||
|
SetVisibleItem(item);
|
||||||
|
else
|
||||||
item->SetVisible(false);
|
item->SetVisible(false);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user