From 7b6b5ba546450e71ecc812356952b594acc5add5 Mon Sep 17 00:00:00 2001
From: Normand Briere <nbriere@noware.ca>
Date: Sun, 16 Jun 2019 12:44:54 -0400
Subject: [PATCH] Fix shadow touched.

---
 GroupEditor.java |   41 +++++++++++++++++++++++++++++++++--------
 1 files changed, 33 insertions(+), 8 deletions(-)

diff --git a/GroupEditor.java b/GroupEditor.java
index 43af894..7bbf24b 100644
--- a/GroupEditor.java
+++ b/GroupEditor.java
@@ -871,6 +871,7 @@
             } else if(e.getSource() == liveCB)
             {
                 cameraView.ToggleLive();
+                refreshContents(false);
             }
             else if(e.getSource() == supportCB)
             {
@@ -1278,7 +1279,7 @@
 		memoryItem.addActionListener(this);
 		menu.add(analyzeItem = new MenuItem("Analyze"));
 		analyzeItem.addActionListener(this);
-		menu.add(dumpItem = new MenuItem("Dump"));
+		menu.add(dumpItem = new MenuItem("Print"));
 		dumpItem.addActionListener(this);
 //		menu.add(pathItem = new MenuItem("From-to path"));
 //		pathItem.addActionListener(this);
@@ -2542,7 +2543,7 @@
 		} else
 		if (source == genNormalsMESHItem)
                 {
-			GenNormals(true); // TODO
+			GenNormalsMESH();
 		} else
 		if (source == genNormalsORGANItem)
                 {
@@ -3515,6 +3516,13 @@
 		refreshContents();
 	}
 	
+	void GenNormalsMESH()
+	{
+		group.GenNormalsMeshS();
+		
+		refreshContents();
+	}
+	
 	void GenNormalsMINE()
 	{
 		group.selection.GenNormalsMINE();
@@ -4313,7 +4321,6 @@
 			//case 702: // Event.LIST_DESELECT
 			group.deselectAll();
 			TreePath tps[] = objEditor.jTree.getSelectionPaths();
-			objEditor.ClearInfo(); // .GetMaterial());
 			if (tps != null)
 			{
 				for (int i=0; i < tps.length; i++)
@@ -4323,9 +4330,6 @@
 					//if (child.parent != null)
 						//child.parent.addSelectee(child);
 					group.addSelectee(child);
-					objEditor.SetMaterial(child); // .GetMaterial());
-					objEditor.AddInfo(child, this, true); // .GetMaterial());
-            System.err.println("info : " + child.GetPath());
 				}
 			}
 //			else
@@ -4335,8 +4339,6 @@
 //            System.err.println("info : " + group.GetPath());
 //                        }
 			
-                        objEditor.SetText(); // jan 2014
-                        
 			if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(tps[0].getLastPathComponent() instanceof Camera))
 				CameraPane.flash = true;
                         
@@ -4360,6 +4362,29 @@
 		
 		freezemodel = false;
 	}
+        
+        void refreshContents(boolean cp)
+        {
+            if (!Globals.MOUSEDRAGGED)
+            {
+                objEditor.ClearInfo(); // .GetMaterial());
+
+                for (int i=0; i < group.selection.size(); i++)
+                {
+                    Object3D child = (Object3D) group.selection.reserve(i);
+
+                    objEditor.SetMaterial(child);
+                    objEditor.AddInfo(child, this, true);
+    System.err.println("info : " + child.GetPath());
+
+                    group.selection.release(i);
+                }
+
+                objEditor.SetText(); // jan 2014
+            }
+                        
+            super.refreshContents(cp);
+        }
 	
 	void linkSomething(Object3D thing)
 	{

--
Gitblit v1.6.2