Skip to content

Commit

Permalink
Document::Section::Viewport: ignore mouse wheel if not on the track/g…
Browse files Browse the repository at this point in the history
…roup thumbnails
  • Loading branch information
pierreguillot committed Oct 25, 2024
1 parent a5d70ca commit 97c68a0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Source/Document/AnlDocumentSection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,15 @@ void Document::Section::Viewport::visibleAreaChanged(juce::Rectangle<int> const&

void Document::Section::Viewport::mouseWheelMove(juce::MouseEvent const& e, juce::MouseWheelDetails const& wheel)
{
useMouseWheelMoveIfNeeded(e, wheel);
auto constexpr leftPart = Track::Section::getThumbnailOffset() + Track::Section::getThumbnailWidth();
auto const bounds = getMainSectionBorderSize().subtractedFrom(getLocalBounds()).withWidth(leftPart);
if(bounds.contains(getMouseXYRelative()))
{
if(!useMouseWheelMoveIfNeeded(e, wheel))
{
Component::mouseWheelMove(e, wheel);
}
}
}

Document::Section::Section(Director& director, juce::ApplicationCommandManager& commandManager)
Expand Down

0 comments on commit 97c68a0

Please sign in to comment.