Fix build break I introduced in previous commit. Add some extra behavior for OutlineListView's right arrow: if the item has children and is expanded, right arrow now jumps to the first child.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30150 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
86656c6b30
commit
dd0e375f41
@ -327,7 +327,7 @@ BListView::MouseDown(BPoint point)
|
||||
if (timeDelta < doubleClickSpeed
|
||||
&& fabs(delta.x) < kDoubleClickTresh
|
||||
&& fabs(delta.y) < kDoubleClickTresh
|
||||
&& fTrack->last_index == index)
|
||||
&& fTrack->item_index == index)
|
||||
doubleClick = true;
|
||||
|
||||
if (doubleClick && index >= fFirstSelected && index <= fLastSelected) {
|
||||
|
@ -141,18 +141,23 @@ void
|
||||
BOutlineListView::KeyDown(const char* bytes, int32 numBytes)
|
||||
{
|
||||
if (numBytes == 1) {
|
||||
int32 currentSel = CurrentSelection();
|
||||
switch (bytes[0]) {
|
||||
case B_RIGHT_ARROW:
|
||||
{
|
||||
BListItem *item = ItemAt(CurrentSelection());
|
||||
if (item && item->fHasSubitems)
|
||||
Expand(item);
|
||||
BListItem *item = ItemAt(currentSel);
|
||||
if (item && item->fHasSubitems) {
|
||||
if (!IsExpanded(currentSel))
|
||||
Expand(item);
|
||||
else
|
||||
Select(currentSel + 1);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
case B_LEFT_ARROW:
|
||||
{
|
||||
BListItem *item = ItemAt(CurrentSelection());
|
||||
BListItem *item = ItemAt(currentSel);
|
||||
if (item) {
|
||||
if (item->fHasSubitems)
|
||||
Collapse(item);
|
||||
|
Loading…
x
Reference in New Issue
Block a user