Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/modellor
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15661/src/net/sourceforge/bprocessor/model/modellor
Modified Files:
TileModellor.java
Log Message:
Changed material to be placed in the project not in the space, later on there should be a material attached to a space though to make things easier. Made the change to the persistence and all using classes as well
Index: TileModellor.java
===================================================================
RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/modellor/TileModellor.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** TileModellor.java 31 Aug 2007 09:09:08 -0000 1.18
--- TileModellor.java 15 Oct 2007 12:41:24 -0000 1.19
***************
*** 92,96 ****
}
space.getOwner().add(startPoint);
! space.add(tileColor);
updateOutline();
updateNet(startPoint);
--- 92,96 ----
}
space.getOwner().add(startPoint);
! Project.getInstance().add(tileColor);
updateOutline();
updateNet(startPoint);
***************
*** 445,451 ****
a = attributes.get("Material");
if (a != null) {
! space.remove(tileColor);
tileColor = (Material)a.getValue();
! space.add(tileColor);
}
a = attributes.get("Surface");
--- 445,452 ----
a = attributes.get("Material");
if (a != null) {
! Project p = Project.getInstance();
! p.remove(tileColor);
tileColor = (Material)a.getValue();
! p.add(tileColor);
}
a = attributes.get("Surface");
|