Ticket #9302: 0001-Fix-9302.-The-selection-is-calculated-properly-after.patch

File 0001-Fix-9302.-The-selection-is-calculated-properly-after.patch, 820 bytes (added by Janus, 11 years ago)
  • src/kits/interface/ListView.cpp

    From 3b8469e015a4353201901cb68337fa641b31c448 Mon Sep 17 00:00:00 2001
    From: Janus <janus2@ymail.com>
    Date: Tue, 18 Dec 2012 21:39:27 +0000
    Subject: [PATCH] Fix #9302. The selection is calculated properly after a list
     insertion (AddList with index)
    
    ---
     src/kits/interface/ListView.cpp |    2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/src/kits/interface/ListView.cpp b/src/kits/interface/ListView.cpp
    index 54a1259..52e19ec 100644
    a b BListView::AddList(BList* list, int32 index)  
    732732    if (!fList.AddList(list, index))
    733733        return false;
    734734
    735     int32 count = fList.CountItems();
     735    int32 count = list->CountItems();
    736736
    737737    if (fFirstSelected != -1 && index < fFirstSelected)
    738738        fFirstSelected += count;