Browse Source

Redundancy is redundant.

master
Lee 12 years ago
parent
commit
5edfc2cb64
1 changed files with 5 additions and 9 deletions
  1. +5
    -9
      src/Render.java

+ 5
- 9
src/Render.java View File

@@ -226,16 +226,12 @@ public class Render extends Canvas implements Runnable, MouseListener,
return;
Patch p = _grid.getPatch(e.getX()/scale, e.getY()/scale);
if (_lastPatch != p) {
if (SwingUtilities.isLeftMouseButton(e)) {
if (p.getState() != 0) {
p.setState(0);
} else {
if (p.getState() != 0) {
p.setState(0);
} else {
if (SwingUtilities.isLeftMouseButton(e)) {
p.setState(states - 1);
}
} else if (SwingUtilities.isRightMouseButton(e)) {
if (p.getState() != 0) {
p.setState(0);
} else {
} else if (SwingUtilities.isRightMouseButton(e)) {
p.setState(1);
}
}


Loading…
Cancel
Save