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

Reply
 
Thread Tools Display Modes
Old 02-28-2023, 12:13 AM   #1
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,985
Default reaper.GoToRegion() doesn`t work for non-active tab (FIXED 6.77+)

Steps to reproduce
1) add new project at first tab
2) add new project at second tab
3) in second tab add region and put edit cursor before that region

Then:

when in second project run
Code:
reaper.GoToRegion(1,1,false)
result is expected - edit cursor moved to start of region (and smooth seek if it its playing)

when in first project run
Code:
reaper.GoToRegion(1,1,false)
result is unexpected - edit cursor is on same position

Last edited by mpl; 03-05-2023 at 05:07 AM.
mpl is offline   Reply With Quote
Old 02-28-2023, 12:55 PM   #2
Buy One
Human being with feelings
 
Buy One's Avatar
 
Join Date: Sep 2019
Posts: 1,147
Default

Quote:
Originally Posted by mpl View Post
reaper.GoToRegion() doesn`t work for non-active tab
Quote:
Originally Posted by mpl View Post
when in second project run

...

when in second project run
...
If you're in the second project isn't it active? And if you're in the second project isn't 0 should passed as project argument since it's active? Did you mean to write 'second project' both times?
Buy One is offline   Reply With Quote
Old 02-28-2023, 07:45 PM   #3
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,985
Default

I building kind of [session view] scrpt, it is a side separate tab project. Scenes implementation is a regions, selected and playlisted from script (or surface interacted with a script).
So by idx=1 I mean second project (active is idx=-1), since in steps to reproduce I firstly opened main project idx=0, then a project to test idx=1.

More on that, in the script under development, I use getting project pointer by project name matching + ValidatePtr. So in the script I gave a direct project pointer to GoToRegion, and it doesn't work, so I put simple example into bugreport for better overview what is going on.

Last edited by mpl; 03-01-2023 at 08:37 PM.
mpl is offline   Reply With Quote
Old 02-28-2023, 07:47 PM   #4
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,985
Default

Quote:
Originally Posted by Buy One View Post
If you're in the second project isn't it active? And if you're in the second project isn't 0 should passed as project argument since it's active? Did you mean to write 'second project' both times?
sorry, it is a typo, fixed in the post
but I still able to reproduce this so bugreport is still valid
mpl is offline   Reply With Quote
Old 03-01-2023, 03:42 AM   #5
Buy One
Human being with feelings
 
Buy One's Avatar
 
Join Date: Sep 2019
Posts: 1,147
Default

OK

Quote:
Originally Posted by mpl View Post
More on that, in the script under development, I use getting project pointer by project name matching + ValidatePtr. So in the script I gave a direct project pointer to GoToRegion, and it doesn't work, so I put simple example into bugreport for better overview what is going on.
I was going to suggest that but had to clarify my understanding of the bug first because the description wasn't precise.
Buy One is offline   Reply With Quote
Old 03-01-2023, 10:21 AM   #6
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,754
Default

side note: the first parameter to GoToRegion() would need to be EnumProjects(1) rather than 1, but I suspect this is a typo in this thread.

Edit: but indeed there's a bug, it moves the cursor in the active project instead of/in addition to in the background project, fixing.

Last edited by Justin; 03-01-2023 at 10:29 AM.
Justin is offline   Reply With Quote
Old 03-01-2023, 01:04 PM   #7
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,985
Default

Quote:
Originally Posted by Justin View Post
side note: the first parameter to GoToRegion() would need to be EnumProjects(1) rather than 1, but I suspect this is a typo in this thread.

Edit: but indeed there's a bug, it moves the cursor in the active project instead of/in addition to in the background project, fixing.
Ah yeah I meant to pass a pointer, not an idx.
Thanks for the looking at it!
mpl 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:37 AM.


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