View Single Post
Old 09-07-2019, 05:50 AM   #2
Burtan
Human being with feelings
 
Join Date: Jan 2013
Location: Düsseldorf, Germany
Posts: 77
Default

I think the bug is in swell-wnd-generic.cpp, it's the same for the mac version.

Code:
void TreeView_SelectItem(HWND hwnd, HTREEITEM item)
{
  treeViewState *tvs = hwnd ? (treeViewState *)hwnd->m_private_data : NULL;
  if (!tvs) return;

  if (tvs->m_sel == item || (item && !tvs->findItem(item,NULL,NULL))) return;

  tvs->m_sel = item;

  static int __rent;
  if (!__rent)
  {
    __rent++;
    NMTREEVIEW nm={{(HWND)hwnd,(UINT_PTR)hwnd->m_id,TVN_SELCHANGED},};
    SendMessage(GetParent(hwnd),WM_NOTIFY,nm.hdr.idFrom,(LPARAM)&nm);
    __rent--;
  }
  tvs->ensureItemVisible(hwnd,tvs->m_sel);
  InvalidateRect(hwnd,NULL,FALSE);
}
The NMTREEVIEW does not contain any information, you could easily add the HTREEITEM though by adding:

Code:
nm.itemNew.hItem = item;
Should I push a pull request? Or what is the best to get this into reaper
Burtan is offline   Reply With Quote