Browse Source

绝对布局bug修改3

master
zhouping 8 years ago
parent
commit
444446ad05
  1. 4
      designer_form/src/com/fr/design/designer/beans/location/AccessDirection.java

4
designer_form/src/com/fr/design/designer/beans/location/AccessDirection.java

@ -33,6 +33,9 @@ public abstract class AccessDirection implements Direction {
protected int[] sorption(int x, int y,Rectangle current_bounds, FormDesigner designer) { protected int[] sorption(int x, int y,Rectangle current_bounds, FormDesigner designer) {
// 自适应布局不需要吸附线,但需要对齐线,对齐线后面处理 // 自适应布局不需要吸附线,但需要对齐线,对齐线后面处理
if (!designer.hasWAbsoluteLayout()) { if (!designer.hasWAbsoluteLayout()) {
designer.getStateModel().setEquidistantLine(null);
designer.getStateModel().setXAbsorptionline(null);
designer.getStateModel().setYAbsorptionline(null);
return new int[] { x, y }; return new int[] { x, y };
} else { } else {
int posy = current_bounds.y; int posy = current_bounds.y;
@ -111,6 +114,7 @@ public abstract class AccessDirection implements Direction {
designer.getStateModel().setXAbsorptionline(findInX && current_bounds.getWidth() > MoveUtils.SORPTION_UNIT ? Absorptionline.createXAbsorptionline(point.x) : null); designer.getStateModel().setXAbsorptionline(findInX && current_bounds.getWidth() > MoveUtils.SORPTION_UNIT ? Absorptionline.createXAbsorptionline(point.x) : null);
designer.getStateModel().setYAbsorptionline(findInY && current_bounds.getHeight() > MoveUtils.SORPTION_UNIT ? Absorptionline.createYAbsorptionline(point.y) : null); designer.getStateModel().setYAbsorptionline(findInY && current_bounds.getHeight() > MoveUtils.SORPTION_UNIT ? Absorptionline.createYAbsorptionline(point.y) : null);
designer.getStateModel().setEquidistantLine(null);
} }
private Rectangle getWidgetRelativeBounds(Rectangle bounds, FormSelection selection){ private Rectangle getWidgetRelativeBounds(Rectangle bounds, FormSelection selection){

Loading…
Cancel
Save