Normand Briere
2019-06-16 b33ef80d78f01a6a61f4248b1bb7deaade42d503
ObjEditor.java
....@@ -278,7 +278,7 @@
278278 frame.setMenuBar(menuBar = new MenuBar());
279279 menuBar.add(fileMenu = new Menu("File"));
280280 fileMenu.add(newItem = new MenuItem("New"));
281
- fileMenu.add(loadItem = new MenuItem("Load..."));
281
+ fileMenu.add(loadItem = new MenuItem("Open..."));
282282
283283 //oe.menuBar.add(menu = new Menu("Include"));
284284 Menu menu = new Menu("Import");
....@@ -2072,19 +2072,19 @@
20722072
20732073 void LoadObjFile(String fullname)
20742074 {
2075
- /*
2075
+ System.out.println("Loading " + fullname);
2076
+ /**/
20762077 //lastFilename = fullname;
20772078 if(loadObjThread == null)
20782079 {
2079
- loadObjThread = new LoadOBJThread();
2080
- loadObjThread.start();
2080
+ loadObjThread = new LoadOBJThread();
2081
+ loadObjThread.start();
20812082 }
20822083
20832084 loadObjThread.add(fullname);
2084
- */
2085
+ /**/
20852086
2086
- System.out.println("Loading " + fullname);
2087
- makeSomething(new FileObject(fullname, true), true);
2087
+ //makeSomething(new FileObject(fullname, true), true);
20882088 }
20892089
20902090 void LoadGFDFile(String fullname)
....@@ -3214,7 +3214,7 @@
32143214 objEditor.refreshContents();
32153215 }
32163216
3217
- static public byte[] Compress(Object o)
3217
+ static public byte[] Compress(Object3D o)
32183218 {
32193219 try
32203220 {
....@@ -3222,8 +3222,13 @@
32223222 java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(baos);
32233223 ObjectOutputStream out = new ObjectOutputStream(zstream);
32243224
3225
+ Object3D parent = o.parent;
3226
+ o.parent = null;
3227
+
32253228 out.writeObject(o);
32263229
3230
+ o.parent = parent;
3231
+
32273232 out.flush();
32283233
32293234 zstream.close();
....@@ -3306,12 +3311,17 @@
33063311 {
33073312 cRadio tab = GetCurrentTab();
33083313
3314
+ boolean temp = CameraPane.SWITCH;
3315
+ CameraPane.SWITCH = false;
3316
+
33093317 copy.ExtractBigData(hashtable);
33103318
33113319 //EditorFrame.m_MainFrame.requestFocusInWindow();
33123320 tab.graphs[tab.undoindex++] = Compress(copy);
33133321
33143322 copy.RestoreBigData(hashtable);
3323
+
3324
+ CameraPane.SWITCH = temp;
33153325
33163326 //assert(hashtable.isEmpty());
33173327
....@@ -3342,6 +3352,9 @@
33423352
33433353 void CopyChanged(Object3D obj)
33443354 {
3355
+ boolean temp = CameraPane.SWITCH;
3356
+ CameraPane.SWITCH = false;
3357
+
33453358 copy.ExtractBigData(hashtable);
33463359
33473360 copy.clear();
....@@ -3353,6 +3366,8 @@
33533366
33543367 copy.RestoreBigData(hashtable);
33553368
3369
+ CameraPane.SWITCH = temp;
3370
+
33563371 //assert(hashtable.isEmpty());
33573372
33583373 copy.Touch();