From b07c5f39de5b6484c68d4dbb48a1a481d94238c4 Mon Sep 17 00:00:00 2001
From: "Alexander G. M. Smith" <agmsmith@ncf.ca>
Date: Tue, 7 Nov 2017 12:56:15 -0500
Subject: [PATCH] Update BListItem::SetHeight() docs with selection box
warning.
The cached top coordinate of each BListItem isn't updated when you
change the height of the item, leading to confusing highlighting and
incorrect mouse clicks. Rather than fixing it, this just documents a
workaround or two to force an update of the cached coordinates.
---
docs/user/interface/ListItem.dox | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/docs/user/interface/ListItem.dox b/docs/user/interface/ListItem.dox
index 23f280b..1b4b3b7 100644
a
|
b
|
|
172 | 172 | |
173 | 173 | \param height The height to set the list item to. |
174 | 174 | |
| 175 | \note Unlike BeOS, if you change the height then you need to force |
| 176 | the BListView to recalculate the cached tops of the item |
| 177 | selection boxes, otherwise selection highlights will be drawn |
| 178 | in the wrong places and mouse clicks will be misinterpreted. |
| 179 | You can do this by adding and removing a dummy BListItem at |
| 180 | the top of the list, or after hrev50780 by calling |
| 181 | BListView::FrameResized() with the current Frame rectangle |
| 182 | (though the FrameResized() method will additionally call |
| 183 | BListItem::Update() for all items). |
| 184 | |
175 | 185 | \since BeOS R3 |
176 | 186 | */ |
177 | 187 | |