Skip to content

Commit ca01a90

Browse files
authored
Merge pull request #201 from bitfocus/copilot/fix-adjust-send-level-command
Fix: Adjust Send Level and Adjust Direct Input Level stuck at -∞
2 parents 62adb8d + d7b74c7 commit ca01a90

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/actions/common.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -869,6 +869,9 @@ export function createCommonActions(self: InstanceBaseExt<WingConfig>): Companio
869869
}
870870
state.storeDelta(cmd, delta)
871871
if (targetValue != undefined) {
872+
if (!usePercentage && targetValue < -90) {
873+
targetValue = -90
874+
}
872875
targetValue += delta
873876
ActionUtil.runTransition(cmd, 'level', event, state, transitions, targetValue, !usePercentage)
874877
}

src/actions/matrix.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ export function createMatrixActions(self: InstanceBaseExt<WingConfig>): Companio
102102
}
103103
state.storeDelta(cmd, delta)
104104
if (targetValue != undefined) {
105+
if (!usePercentage && targetValue < -90) {
106+
targetValue = -90
107+
}
105108
targetValue += delta
106109
ActionUtil.runTransition(cmd, 'level', event, state, transitions, targetValue, !usePercentage)
107110
}

0 commit comments

Comments
 (0)