[haiku-development] Re: Query about BOutlineListView

  • From: "Máximo Castañeda" <dmarc-noreply@xxxxxxxxxxxxx> ("antiswen")
  • To: "haiku-development@xxxxxxxxxxxxx" <haiku-development@xxxxxxxxxxxxx>
  • Date: Sat, 6 Apr 2024 17:10:18 +0000 (UTC)

 En sábado, 6 de abril de 2024, 17:58:49 CEST, Zenja Solaja <solaja@xxxxxxxxx> 
escribió: 

Code is very simple:
fTreeOutlineView->FullListItemAt(idx)->Select();  // correct item is 
highlighted, but fLastSelected is not set in code path. 
//fTreeOutlineView->Select(idx);  //incorrect item is highlighted, but with 
fLastSelected naturally pointing to highlighted item

The BoutlineListView is a directory tree, and I’m highlighting a specific 
file on app start (last session restore). I calculate the full list idx. 

I've tried the code in the first response and it works as it should. I even 
tried directly selecting with the "full list" index and even though it didn't 
select that item (or none at all) if some were collapsed, there's no error, all 
as expected.

Other related posts: