Skip to content

Commit

Permalink
Merge pull request ddnet#6919 from Marmare314/zoomresetoffset
Browse files Browse the repository at this point in the history
improve envelope y offset on reset for small value ranges
  • Loading branch information
Robyt3 authored Jul 26, 2023
2 parents 11a2088 + 3010633 commit b440962
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/game/editor/editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5652,7 +5652,7 @@ void CEditor::ResetZoomEnvelope(CEnvelope *pEnvelope, int ActiveChannels)
if(ValueRange < 0.1f)
{
// Set view to some sane default if range is too small
m_OffsetEnvelopeY = 0.5f - Top / 0.1f;
m_OffsetEnvelopeY = 0.5f - ValueRange / 0.2f - Bottom / 0.1f;
m_ZoomEnvelopeY.SetZoomInstant(0.1f);
}
else
Expand Down

0 comments on commit b440962

Please sign in to comment.