From 4113164b3be1e50251ac40d6fd65660f0a6c2e63 Mon Sep 17 00:00:00 2001 From: Normand Briere <nbriere@noware.ca> Date: Tue, 11 Jun 2019 18:46:21 -0400 Subject: [PATCH] Compressed undo stack. --- ObjEditor.java | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ObjEditor.java b/ObjEditor.java index 2cb5163..13331f4 100644 --- a/ObjEditor.java +++ b/ObjEditor.java @@ -2927,7 +2927,7 @@ return; } else if (event.getSource() == toggleSwitchItem) { - cameraView.ToggleRandom(); + cameraView.ToggleSwitch(); cameraView.repaint(); return; } else if (event.getSource() == toggleHandleItem) @@ -3239,6 +3239,7 @@ static public Object Uncompress(byte[] bytes) { + System.out.println("#bytes = " + bytes.length); try { ByteArrayInputStream bais = new ByteArrayInputStream(bytes); @@ -3308,7 +3309,7 @@ copy.ExtractBigData(hashtable); //EditorFrame.m_MainFrame.requestFocusInWindow(); - tab.graphs[tab.undoindex++] = (Object3D)clone(copy); + tab.graphs[tab.undoindex++] = Compress(copy); copy.RestoreBigData(hashtable); @@ -3393,7 +3394,7 @@ tab.undoindex -= 1; - CopyChanged(tab.graphs[tab.undoindex]); + CopyChanged((Object3D)Uncompress(tab.graphs[tab.undoindex])); } public void Redo() @@ -3408,7 +3409,7 @@ tab.undoindex += 1; - CopyChanged(tab.graphs[tab.undoindex]); + CopyChanged((Object3D)Uncompress(tab.graphs[tab.undoindex])); } void ImportGFD() -- Gitblit v1.6.2