From 46dbce888e7c3eff8969f1ddbe22e144410b67f4 Mon Sep 17 00:00:00 2001
From: Normand Briere <nbriere@noware.ca>
Date: Sun, 07 Jul 2019 10:20:06 -0400
Subject: [PATCH] Put back serial IDs for cone and torus.

---
 CameraPane.java |   50 +++++++++++++++++++++++++++++++++++---------------
 1 files changed, 35 insertions(+), 15 deletions(-)

diff --git a/CameraPane.java b/CameraPane.java
index d0c68fd..9699e8e 100644
--- a/CameraPane.java
+++ b/CameraPane.java
@@ -14604,7 +14604,8 @@
         Globals.MOUSEDRAGGED = false;
         
         movingcamera = false;
-        X = Y = 0;
+        X = 0; // getBounds().width/2;
+        Y = 0; // getBounds().height/2;
         //System.out.println("mouseReleased: " + e);
         clickEnd(e.getX(), e.getY(), e.getModifiersEx());
     }
@@ -15717,23 +15718,42 @@
              */
             if (!isRenderer)
             {
-                object.drawEditHandles(info, 0);
-                
-                if (drag && (X != 0 || Y != 0) && object.selection.Size() > 0)
+                if (object.selection.Size() > 0)
                 {
-                    switch (object.selection.get(0).hitSomething)
+                    int hitSomething = object.selection.get(0).hitSomething;
+
+                    info.DX = 0;
+                    info.DY = 0;
+                    info.W = 1;
+                    if (hitSomething == Object3D.hitCenter)
                     {
-                        case Object3D.hitCenter: gr.setColor(Color.pink);
-                            gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2);
-                            break;
-                        case Object3D.hitRotate: gr.setColor(Color.yellow);
-                            gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2);
-                        break;
-                        case Object3D.hitScale: gr.setColor(Color.cyan);
-                            gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2);
-                        break;
+                        info.DX = X;
+                        if (X != 0)
+                            info.DX -= info.bounds.width/2;
+
+                        info.DY = Y;
+                        if (Y != 0)
+                            info.DY -= info.bounds.height/2;
                     }
-                    
+
+                    object.drawEditHandles(info, 0);
+
+                    if (drag && (X != 0 || Y != 0))
+                    {
+                        switch (hitSomething)
+                        {
+                            case Object3D.hitCenter: gr.setColor(Color.pink);
+                                gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2);
+                                break;
+                            case Object3D.hitRotate: gr.setColor(Color.yellow);
+                                gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2);
+                            break;
+                            case Object3D.hitScale: gr.setColor(Color.cyan);
+                                gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2);
+                            break;
+                        }
+
+                    }
                 }
             }
         }

--
Gitblit v1.6.2