From: Mark Slee Date: Wed, 21 Aug 2013 06:45:57 +0000 (-0700) Subject: Fix bug with mapping tool and library bugfixes X-Git-Url: https://git.piment-noir.org/?p=SugarCubes.git;a=commitdiff_plain;h=9f823de4d0b5a8dacc5ee284fbd79c2cfd9d3e4e Fix bug with mapping tool and library bugfixes --- diff --git a/TestPatterns.pde b/TestPatterns.pde index bdaa78a..e47651a 100644 --- a/TestPatterns.pde +++ b/TestPatterns.pde @@ -256,7 +256,7 @@ class MappingTool extends TestPattern { if (activeChannel.mode == ChannelMapping.MODE_CUBES) { int i = 1; for (int index : activeChannel.objectIndices) { - if (c == model.getCubeByRawIndex(index)) { + if ((index >= 0) && (c == model.getCubeByRawIndex(index))) { return i; } ++i; @@ -359,10 +359,7 @@ class MappingTool extends TestPattern { } public void decChannel() { - --channelIndex; - if (channelIndex < 0) { - channelIndex += numChannels; - } + channelIndex = (channelIndex + numChannels - 1) % numChannels; setChannel(); } @@ -371,10 +368,7 @@ class MappingTool extends TestPattern { } public void decStrip() { - --stripIndex; - if (stripIndex < 0) { - stripIndex += Cube.STRIPS_PER_CUBE; - } + stripIndex = (stripIndex + Cube.STRIPS_PER_CUBE - 1) % Cube.STRIPS_PER_CUBE; } public void keyPressed() { diff --git a/code/GLucose.jar b/code/GLucose.jar index d8f3c05..457c974 100644 Binary files a/code/GLucose.jar and b/code/GLucose.jar differ diff --git a/code/HeronLX.jar b/code/HeronLX.jar index 608c30c..5771318 100644 Binary files a/code/HeronLX.jar and b/code/HeronLX.jar differ