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. --- CameraPane.java | 25 +++++++++++++++++++++---- 1 files changed, 21 insertions(+), 4 deletions(-) diff --git a/CameraPane.java b/CameraPane.java index 0d3d46b..16d28d9 100644 --- a/CameraPane.java +++ b/CameraPane.java @@ -2265,7 +2265,7 @@ LOOKAT ^= true; } - void ToggleRandom() + void ToggleSwitch() { SWITCH ^= true; } @@ -10392,13 +10392,13 @@ ambientOcclusion = false; } - if (Globals.lighttouched && DrawMode() == DEFAULT && !lightMode) // && !FROZEN) + if (Globals.lighttouched && DrawMode() == DEFAULT) // && !lightMode) // && !FROZEN) { //if (RENDERSHADOW) // ? if (!IsFrozen()) { // dec 2012 - if (!ambientOcclusion && !(!flash && !lightMode && DrawMode() == DEFAULT && ANTIALIAS > 0)) + if (!ambientOcclusion && !(!flash && DrawMode() == DEFAULT && ANTIALIAS > 0)) { Globals.framecount++; shadowbuffer.display(); @@ -11552,7 +11552,7 @@ return; } - String string = obj.GetToolTip(); + String string = obj.toString(); //.GetToolTip(); GL gl = GetGL(); @@ -14374,6 +14374,7 @@ public void mouseReleased(MouseEvent e) { movingcamera = false; + X = Y = 0; //System.out.println("mouseReleased: " + e); clickEnd(e.getX(), e.getY(), e.getModifiersEx()); } @@ -15382,7 +15383,9 @@ info.bounds.setBounds(0, 0, (int) (width * zoom), (int) (height * zoom)); //Image img = CreateImage(width, height); //System.out.println("width = " + width + "; height = " + height + "\n"); + Graphics gr = g; // img.getGraphics(); + if (!hasMarquee) { if (Xmin < Xmax) // !locked) @@ -15480,14 +15483,28 @@ if (!isRenderer) { object.drawEditHandles(info, 0); + + if (drag && (X != 0 || Y != 0) && object.selection.Size() > 0) + { + switch (object.selection.get(0).hitSomething) + { + case Object3D.hitCenter: gr.setColor(Color.pink); break; + case Object3D.hitRotate: gr.setColor(Color.green); break; + case Object3D.hitScale: gr.setColor(Color.cyan); break; + } + + gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2); + } } } + if (isRenderer) { //gr.setColor(Color.black); //gr.drawRect(info.bounds.x - 1, info.bounds.y - 1, info.bounds.width + 1, info.bounds.height + 1); //gr.drawRect(info.bounds.x - 2, info.bounds.y - 2, info.bounds.width + 3, info.bounds.height + 3); } + if (hasMarquee) { gr.setXORMode(Color.white); -- Gitblit v1.6.2