Normand Briere
2019-06-13 4629090fafbef256abd0686a85ee12042d658868
ObjEditor.java
....@@ -2927,7 +2927,7 @@
29272927 return;
29282928 } else if (event.getSource() == toggleSwitchItem)
29292929 {
2930
- cameraView.ToggleRandom();
2930
+ cameraView.ToggleSwitch();
29312931 cameraView.repaint();
29322932 return;
29332933 } else if (event.getSource() == toggleHandleItem)
....@@ -3239,6 +3239,7 @@
32393239
32403240 static public Object Uncompress(byte[] bytes)
32413241 {
3242
+ System.out.println("#bytes = " + bytes.length);
32423243 try
32433244 {
32443245 ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
....@@ -3305,12 +3306,17 @@
33053306 {
33063307 cRadio tab = GetCurrentTab();
33073308
3309
+ boolean temp = CameraPane.SWITCH;
3310
+ CameraPane.SWITCH = false;
3311
+
33083312 copy.ExtractBigData(hashtable);
33093313
33103314 //EditorFrame.m_MainFrame.requestFocusInWindow();
3311
- tab.graphs[tab.undoindex++] = (Object3D)clone(copy);
3315
+ tab.graphs[tab.undoindex++] = Compress(copy);
33123316
33133317 copy.RestoreBigData(hashtable);
3318
+
3319
+ CameraPane.SWITCH = temp;
33143320
33153321 //assert(hashtable.isEmpty());
33163322
....@@ -3341,6 +3347,9 @@
33413347
33423348 void CopyChanged(Object3D obj)
33433349 {
3350
+ boolean temp = CameraPane.SWITCH;
3351
+ CameraPane.SWITCH = false;
3352
+
33443353 copy.ExtractBigData(hashtable);
33453354
33463355 copy.clear();
....@@ -3351,6 +3360,8 @@
33513360 }
33523361
33533362 copy.RestoreBigData(hashtable);
3363
+
3364
+ CameraPane.SWITCH = temp;
33543365
33553366 //assert(hashtable.isEmpty());
33563367
....@@ -3393,7 +3404,7 @@
33933404
33943405 tab.undoindex -= 1;
33953406
3396
- CopyChanged(tab.graphs[tab.undoindex]);
3407
+ CopyChanged((Object3D)Uncompress(tab.graphs[tab.undoindex]));
33973408 }
33983409
33993410 public void Redo()
....@@ -3408,7 +3419,7 @@
34083419
34093420 tab.undoindex += 1;
34103421
3411
- CopyChanged(tab.graphs[tab.undoindex]);
3422
+ CopyChanged((Object3D)Uncompress(tab.graphs[tab.undoindex]));
34123423 }
34133424
34143425 void ImportGFD()