Update of /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv8264/src/net/sourceforge/bprocessor/facade/modellor
Modified Files:
FacadeModellor.java
Log Message:
Fixups in the facde. Including making undo work better.
Index: FacadeModellor.java
===================================================================
RCS file: /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor/FacadeModellor.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** FacadeModellor.java 6 Nov 2006 11:01:03 -0000 1.27
--- FacadeModellor.java 12 Nov 2006 23:02:46 -0000 1.28
***************
*** 141,145 ****
depth = 0.2;
createPostConstructors();
! createFacade();
}
--- 141,146 ----
depth = 0.2;
createPostConstructors();
! createFacade();
! Project.getInstance().checkpoint();
}
***************
*** 168,172 ****
}
}
-
/**
* Creates the facade based on its type.
--- 169,172 ----
***************
*** 194,197 ****
--- 194,206 ----
}
}
+ if (topBound != null &&
+ leftBound != null &&
+ bottomBound != null &&
+ rightBound != null) {
+ space.add(topBound);
+ space.add(leftBound);
+ space.add(bottomBound);
+ space.add(rightBound);
+ }
if (type == SINGLE_BAR) {
createFrame();
***************
*** 203,220 ****
*/
private void removeConstructors() {
! {
! Iterator it = vertCons.iterator();
! while (it.hasNext()) {
! space.remove((Constructor)it.next());
! }
! vertCons = new LinkedList();
}
! {
! Iterator it = horCons.iterator();
! while (it.hasNext()) {
! space.remove((Constructor)it.next());
! }
! horCons = new LinkedList();
}
}
/**
--- 212,226 ----
*/
private void removeConstructors() {
! Iterator it = vertCons.iterator();
! while (it.hasNext()) {
! space.remove((Constructor)it.next());
}
! it = horCons.iterator();
! while (it.hasNext()) {
! space.remove((Constructor)it.next());
}
+
+ vertCons = new LinkedList();
+ horCons = new LinkedList();
}
/**
***************
*** 447,453 ****
leftBound = new Line(cross.add(leftOffset), vertDir);
bottomBound = new Line(cross.add(bottomOffset), horDir);
! rightBound = new Line(cross.add(rightOffset), vertDir);
}
createSegmentLines();
}
}
--- 453,468 ----
leftBound = new Line(cross.add(leftOffset), vertDir);
bottomBound = new Line(cross.add(bottomOffset), horDir);
! rightBound = new Line(cross.add(rightOffset), vertDir);
! space.add(topBound);
! space.add(leftBound);
! space.add(bottomBound);
! space.add(rightBound);
}
createSegmentLines();
+ } else {
+ /** The front surface is somehow out of shape */
+ removeConstructors();
+ removeSegmentLines();
+ removeFacade();
}
}
***************
*** 525,529 ****
*/
private void createWindows() {
! if (front != null && depth > 0) {
Vertex vDir = new Vertex(0, 0, 0);
Vertex hDir = new Vertex(0, 0, 0);
--- 540,545 ----
*/
private void createWindows() {
! if (front != null && depth > 0 &&
! vertSegs[0][0] != null && horSegs[0][0] != null) {
Vertex vDir = new Vertex(0, 0, 0);
Vertex hDir = new Vertex(0, 0, 0);
|