Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repair BR_GetMouseCursorContext over envelopes lanes set to "Project default behavior outside of automation items" #1909

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 8 additions & 16 deletions Breeder/BR_MouseUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -624,13 +624,10 @@ 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))
{
if (!this->IsMouseOverAI(envelope, height - 2 * ENV_GAP, offset + ENV_GAP, mouseY, mousePos))
trackEnvHit = 0;
}
int aiOptions = envelope.GetAIoptions(); // -1 == use project default
if (aiOptions < 0) aiOptions = *ConfigVar<int>("pooledenvattach");
if (aiOptions & 4 && !this->IsMouseOverAI(envelope, height - 2 * ENV_GAP, offset + ENV_GAP, mouseY, mousePos))
trackEnvHit = 0;
}
}

Expand Down Expand Up @@ -681,16 +678,11 @@ 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))
{
if (!this->IsMouseOverAI(envelope, height - 2 * ENV_GAP, offset + ENV_GAP, mouseY, mousePos))
{
mouseInfo.details = "empty";
}
}
int aiOptions = envelope.GetAIoptions(); // -1 == use project default
if (aiOptions < 0) aiOptions = *ConfigVar<int>("pooledenvattach");
if (aiOptions & 4 && !this->IsMouseOverAI(envelope, height - 2 * ENV_GAP, offset + ENV_GAP, mouseY, mousePos))
mouseInfo.details = "empty";
}
// Item and things inside it
if (!trackEnvHit && mouseInfo.item)
Expand Down