increased repaint hack time

This commit is contained in:
bancika
2011-01-06 00:39:52 +00:00
parent e612b39b26
commit 53433f0836
2 changed files with 6 additions and 3 deletions
@@ -73,6 +73,7 @@ public class Presenter implements IPlugInPort {
private Map<IDIYComponent<?>, Area> componentAreaMap;
private Project currentProject;
private Map<String, List<ComponentType>> componentTypes;
@SuppressWarnings("unchecked")
private Map<Class<? extends IDIYComponent>, ComponentType> componentTypeMap;
private List<IPlugIn> plugIns;
@@ -738,8 +739,10 @@ public class Presenter implements IPlugInPort {
Point controlPoint = component.getControlPoint(j);
int x = controlPoint.x + point.x;
int y = controlPoint.y + point.y;
x = (int) (Math.round(x / Constants.GRID) * Constants.GRID);
y = (int) (Math.round(y / Constants.GRID) * Constants.GRID);
if (snapToGrid) {
x = (int) (Math.round(x / Constants.GRID) * Constants.GRID);
y = (int) (Math.round(y / Constants.GRID) * Constants.GRID);
}
controlPoint.setLocation(x, y);
component.setControlPoint(controlPoint, j);
}