[Bprocessor-commit] gui/src/net/sourceforge/bprocessor/gui/actions FileImportActionListener.java, 1
Status: Pre-Alpha
Brought to you by:
henryml
From: rimestad <rim...@us...> - 2007-11-12 14:15:31
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv16958/src/net/sourceforge/bprocessor/gui/actions Modified Files: FileImportActionListener.java ImportFileReader.java Log Message: Removed lock from space, and created a LibraryObj to encapsulate the union spaces for the library. Made changes acording to that in the treeview. Index: FileImportActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/FileImportActionListener.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** FileImportActionListener.java 5 Nov 2007 18:11:22 -0000 1.13 --- FileImportActionListener.java 12 Nov 2007 14:15:28 -0000 1.14 *************** *** 26,29 **** --- 26,30 ---- import net.sourceforge.bprocessor.gui.GUI; + import net.sourceforge.bprocessor.model.LibraryObj; import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Space; *************** *** 107,113 **** } else if (lfile.getName().endsWith(".obj")) { try { ! Space into = Project.getInstance().getActiveSpace(); ! Space s = into.createUnion(lfile.getName()); ! Project.getInstance().addCalalogObject(s); ImportFileReader.importObjFile(lfile, s, info.objPanel.getScale(), info.objPanel.getDirection(), info.objPanel.getCalcNormals()); --- 108,115 ---- } else if (lfile.getName().endsWith(".obj")) { try { ! Space s = new Space(lfile.getName(), Space.CONSTRUCTION, true); ! s.setUnion(true); ! LibraryObj lo = new LibraryObj(Byte.MAX_VALUE, lfile, s); ! Project.getInstance().addCalalogObject(lo); ImportFileReader.importObjFile(lfile, s, info.objPanel.getScale(), info.objPanel.getDirection(), info.objPanel.getCalcNormals()); Index: ImportFileReader.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/ImportFileReader.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** ImportFileReader.java 5 Nov 2007 10:18:58 -0000 1.12 --- ImportFileReader.java 12 Nov 2007 14:15:28 -0000 1.13 *************** *** 200,204 **** into.add(s); } - s.setLocked(true); } for (Material m : materialMap.values()) { --- 200,203 ---- *************** *** 217,221 **** into.addProtected(s); } - into.setLocked(true); into.changed(); stream.close(); --- 216,219 ---- |