repositories
/
SugarCubes.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix bug with mapping tool and library bugfixes
[SugarCubes.git]
/
TestPatterns.pde
diff --git
a/TestPatterns.pde
b/TestPatterns.pde
index bdaa78ac563b916aacd84974cb4a79c2c4d973c3..e47651af4271f4cdf8618190fb2ac8326e142816 100644
(file)
--- 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 (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;
return i;
}
++i;
@@
-359,10
+359,7
@@
class MappingTool extends TestPattern {
}
public void decChannel() {
}
public void decChannel() {
- --channelIndex;
- if (channelIndex < 0) {
- channelIndex += numChannels;
- }
+ channelIndex = (channelIndex + numChannels - 1) % numChannels;
setChannel();
}
setChannel();
}
@@
-371,10
+368,7
@@
class MappingTool extends TestPattern {
}
public void decStrip() {
}
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() {
}
public void keyPressed() {