[haiku-commits] haiku: hrev49488 - src/kits/interface

  • From: anevilyak@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 31 Jul 2015 04:36:42 +0200 (CEST)

hrev49488 adds 1 changeset to branch 'master'
old head: 6306a2634bf096c2ebbe4a772538703350234d28
new head: 3333f968888ae8017be5c01149e619a533b0aba1
overview:
http://cgit.haiku-os.org/haiku/log/?qt=range&q=3333f968888a+%5E6306a2634bf0

----------------------------------------------------------------------------

3333f968888a: SplitLayout: Fix #12261.

- SetItemCollapsed()/IsItemCollapsed() didn't properly handle inverting
values when mapping between the collapsed flag and the layout item's
internal visibility flag, leading to them having the opposite semantics
from what their name would suggest.

[ Rene Gollent <rene@xxxxxxxxxxx> ]

----------------------------------------------------------------------------

Revision: hrev49488
Commit: 3333f968888ae8017be5c01149e619a533b0aba1
URL: http://cgit.haiku-os.org/haiku/commit/?id=3333f968888a
Author: Rene Gollent <rene@xxxxxxxxxxx>
Date: Fri Jul 31 02:33:36 2015 UTC

Ticket: https://dev.haiku-os.org/ticket/12261

----------------------------------------------------------------------------

1 file changed, 3 insertions(+), 2 deletions(-)
src/kits/interface/SplitLayout.cpp | 5 +++--

----------------------------------------------------------------------------

diff --git a/src/kits/interface/SplitLayout.cpp
b/src/kits/interface/SplitLayout.cpp
index 48537c2..b15c998 100644
--- a/src/kits/interface/SplitLayout.cpp
+++ b/src/kits/interface/SplitLayout.cpp
@@ -1,5 +1,6 @@
/*
* Copyright 2006-2009, Ingo Weinhold <ingo_weinhold@xxxxxx>.
+ * Copyright 2015, Rene Gollent, rene@xxxxxxxxxxx.
* All rights reserved. Distributed under the terms of the MIT License.
*/

@@ -493,14 +494,14 @@ BSplitLayout::SetCollapsible(int32 first, int32 last,
bool collapsible)
bool
BSplitLayout::IsItemCollapsed(int32 index) const
{
- return _ItemLayoutInfo(ItemAt(index))->isVisible;
+ return !_ItemLayoutInfo(ItemAt(index))->isVisible;
}


void
BSplitLayout::SetItemCollapsed(int32 index, bool collapsed)
{
- ItemAt(index)->SetVisible(collapsed);
+ ItemAt(index)->SetVisible(!collapsed);

InvalidateLayout(true);
}


Other related posts:

  • » [haiku-commits] haiku: hrev49488 - src/kits/interface - anevilyak