From 44b1501b5c4cd60ea67cc3d0971ed53f53b594e6 Mon Sep 17 00:00:00 2001
From: Normand Briere <nbriere@noware.ca>
Date: Sun, 05 May 2019 10:19:33 -0400
Subject: [PATCH] Support for right click.

---
 Object3D.java |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/Object3D.java b/Object3D.java
index 6536ddc..76593d2 100644
--- a/Object3D.java
+++ b/Object3D.java
@@ -2477,13 +2477,13 @@
         return retval;
     }
 
-    void doEditDrag(ClickInfo info)
+    void doEditDrag(ClickInfo info, boolean opposite)
     {
         switch (doSomething)
         {
             case 1: // '\001'
                 //super.
-                        doEditDrag0(info);
+                        doEditDrag0(info, opposite);
                 break;
 
             case 2: // '\002'
@@ -2496,11 +2496,11 @@
                     {
                         //sel.hitSomething = childToDrag.hitSomething;
                         //childToDrag.doEditDrag(info);
-                        sel.doEditDrag(info);
+                        sel.doEditDrag(info, opposite);
                     } else
                     {
                         //super.
-                                doEditDrag0(info);
+                                doEditDrag0(info, opposite);
                     }
                 }
                 break;
@@ -7012,7 +7012,7 @@
         return true;
     }
 
-    void doEditDrag0(ClickInfo info)
+    void doEditDrag0(ClickInfo info, boolean opposite)
     {
         if (hitSomething == 0)
         {
@@ -7039,7 +7039,7 @@
                 
                 scale *= 0.05f * Globals.theRenderer.RenderCamera().Distance();
                 
-                if (modified)
+                if (modified || opposite)
                 {
                     //assert(false);
                             /*
@@ -7133,6 +7133,7 @@
 
                 if (modified)
                 {
+                    // Rotate 90 degrees
                     angle /= (Math.PI / 4);
                     angle = Math.floor(angle + 0.5);
                     angle *= (Math.PI / 4);

--
Gitblit v1.6.2