Skip to content

Commit

Permalink
Fix minimap mouse interaction bug
Browse files Browse the repository at this point in the history
  • Loading branch information
timothyschoen committed Jan 4, 2025
1 parent f2d72b5 commit 5d8cf9a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Source/CanvasViewport.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,13 @@ class Minimap : public Component, public Timer, public AsyncUpdater

if(renderMinimap && minimapAlpha != 1.0f)
{
setVisible(true);
minimapTargetAlpha = 1.0f;
if(!isTimerRunning()) startTimer(11);
}
else if(!renderMinimap && minimapAlpha != 0.0f)
{
setVisible(false);
minimapTargetAlpha = 0.0f;
if(!isTimerRunning()) startTimer(11);
}
Expand Down Expand Up @@ -156,7 +158,6 @@ class Minimap : public Component, public Timer, public AsyncUpdater
if(approximatelyEqual(minimapAlpha, minimapTargetAlpha))
{
minimapAlpha = minimapTargetAlpha;
setVisible(minimapAlpha != 0.0f);
stopTimer();
}
cnv->editor->nvgSurface.invalidateAll();
Expand Down Expand Up @@ -458,7 +459,7 @@ class CanvasViewport final : public Viewport

setScrollBarThickness(8);

addAndMakeVisible(minimap);
addChildComponent(minimap);
addAndMakeVisible(vbar);
addAndMakeVisible(hbar);

Expand Down

0 comments on commit 5d8cf9a

Please sign in to comment.