Skip to content

Commit

Permalink
repair BR_GetMouseCursorContext over envelopes lanes set to "Project …
Browse files Browse the repository at this point in the history
…default behavior outside of automation items"

Fixes reaper-oss#1908, regression from 9916097
  • Loading branch information
cfillion committed Oct 18, 2024
1 parent 539b524 commit eb9b111
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions Breeder/BR_MouseUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -624,9 +624,9 @@ void BR_MouseInfo::GetContext (const POINT& p)
// if env is hit, check if underlying envelope outside of automation items is bypassed, #1727
if (trackEnvHit)
{
int bypassUnderlEnvProjDefault = *ConfigVar<int>("pooledenvattach") & 4;
int AIoptions = envelope.GetAIoptions(); // -1 == use project default
if ((bypassUnderlEnvProjDefault && AIoptions == -1) || (AIoptions & 4))
const int projAiOptions = *ConfigVar<int>("pooledenvattach");
const int aiOptions = envelope.GetAIoptions(); // -1 == use project default
if ((aiOptions < 0 ? projAiOptions : aiOptions) & 4)
{
if (!this->IsMouseOverAI(envelope, height - 2 * ENV_GAP, offset + ENV_GAP, mouseY, mousePos))
trackEnvHit = 0;
Expand Down Expand Up @@ -681,15 +681,13 @@ void BR_MouseInfo::GetContext (const POINT& p)
else if (trackEnvHit == 2) mouseInfo.details = "env_segment";

// if env is hit, check if underlying envelope outside of automation items is bypassed, #1488
int bypassUnderlEnvProjDefault = *ConfigVar<int>("pooledenvattach") & 4;
BR_Envelope envelope(mouseInfo.envelope);
int AIoptions = envelope.GetAIoptions(); // -1 == use project default
if ((bypassUnderlEnvProjDefault && AIoptions == -1) || (AIoptions & 4))
const int projAiOptions = *ConfigVar<int>("pooledenvattach");
const int aiOptions = envelope.GetAIoptions(); // -1 == use project default
if ((aiOptions < 0 ? projAiOptions : aiOptions) & 4)
{
if (!this->IsMouseOverAI(envelope, height - 2 * ENV_GAP, offset + ENV_GAP, mouseY, mousePos))
{
mouseInfo.details = "empty";
}
}
}
// Item and things inside it
Expand Down

0 comments on commit eb9b111

Please sign in to comment.