Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Bug Reports

Reply
 
Thread Tools Display Modes
Old 04-20-2024, 01:48 AM   #1
AZpercussion
Human being with feelings
 
Join Date: Oct 2019
Location: Moscow / Tbilisi
Posts: 933
Default API: I_LASTH returns wrong value when lanes are collapsed

The bug apeears when I use reaper.GetItemFromPoint before reaper.GetMediaItemInfo_Value( item_under_mouse, "I_LASTH" )

It depends on the mouse placement and if I use reaper.GetSelectedMediaItem everything works well.

So, here simple code:
Code:
x, y = reaper.GetMousePosition()
  
item_under_mouse = reaper.GetItemFromPoint(x,y,true)

if item_under_mouse then 
  item_h = reaper.GetMediaItemInfo_Value( item_under_mouse, "I_LASTH" )
  reaper.ShowConsoleMsg(item_h)
end
Note that there should be some items in lanes under the target item.

Look at how it works with different mouse positions in height.

AZpercussion is offline   Reply With Quote
Old 04-20-2024, 04:59 AM   #2
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 15,976
Default

Fixing, thanks for the report. The bug is that GetItemFromPoint returns items on hidden lanes.
schwa is offline   Reply With Quote
Old 04-20-2024, 06:00 AM   #3
AZpercussion
Human being with feelings
 
Join Date: Oct 2019
Location: Moscow / Tbilisi
Posts: 933
Default

Thanks for fast reaction!)
AZpercussion is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 01:54 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.