Ticket #13730: OutlineListView_EachItemUnder.diff

File OutlineListView_EachItemUnder.diff, 660 bytes (added by jalopeura, 7 years ago)
  • src/kits/interface/OutlineListView.cpp

    diff --git a/src/kits/interface/OutlineListView.cpp b/src/kits/interface/OutlineListView.cpp
    index 3220cfc..9de2575 100644
    a b BOutlineListView::EachItemUnder(BListItem* superItem, bool oneLevelOnly,  
    725725    if (i == -1)
    726726        return NULL;
    727727
     728    i++; // skip the superitem
    728729    while (i < FullListCountItems()) {
    729730        BListItem* item = FullListItemAt(i);
    730731
    731732        // If we jump out of the subtree, return NULL
    732         if (item->fLevel < superItem->OutlineLevel())
     733        if (item->fLevel <= superItem->OutlineLevel())
    733734            return NULL;
    734735
    735736        // If the level matches, check the index