[haiku-commits] Change in haiku[master]: BCardLayout: make the first item visible.

  • From: Gerrit <review@xxxxxxxxxxxxxxxxxxx>
  • To: waddlesplash <waddlesplash@xxxxxxxxx>, haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 11 May 2020 18:49:28 +0000

From Adrien Destugues <pulkomandy@xxxxxxxxx>:

Adrien Destugues has uploaded this change for review. ( 
https://review.haiku-os.org/c/haiku/+/2683 ;)


Change subject: BCardLayout: make the first item visible.
......................................................................

BCardLayout: make the first item visible.
---
M src/kits/interface/CardLayout.cpp
1 file changed, 4 insertions(+), 1 deletion(-)



  git pull ssh://git.haiku-os.org:22/haiku refs/changes/83/2683/1

diff --git a/src/kits/interface/CardLayout.cpp 
b/src/kits/interface/CardLayout.cpp
index cd8e246..eccaf36 100644
--- a/src/kits/interface/CardLayout.cpp
+++ b/src/kits/interface/CardLayout.cpp
@@ -270,7 +270,10 @@
 bool
 BCardLayout::ItemAdded(BLayoutItem* item, int32 atIndex)
 {
-       item->SetVisible(false);
+       if (CountItems() <= 1)
+               SetVisibleItem(item);
+       else
+               item->SetVisible(false);
        return true;
 }


--
To view, visit https://review.haiku-os.org/c/haiku/+/2683
To unsubscribe, or for help writing mail filters, visit 
https://review.haiku-os.org/settings

Gerrit-Project: haiku
Gerrit-Branch: master
Gerrit-Change-Id: I7b836a22bc5c281bec9b44859c42fec56af45574
Gerrit-Change-Number: 2683
Gerrit-PatchSet: 1
Gerrit-Owner: Adrien Destugues <pulkomandy@xxxxxxxxx>
Gerrit-MessageType: newchange

Other related posts:

  • » [haiku-commits] Change in haiku[master]: BCardLayout: make the first item visible. - Gerrit