Explorar o código

Fix for Issue #90 for Camera orbit object bug

DavidWyand-GG %!s(int64=13) %!d(string=hai) anos
pai
achega
497f3c96dc

+ 3 - 0
Engine/source/gui/worldEditor/worldEditor.cpp

@@ -2911,6 +2911,9 @@ void WorldEditor::dropCurrentSelection( bool skipUndo )
       submitUndo( mSelected );
 
 	dropSelection( mSelected );	
+
+   if ( mSelected->hasCentroidChanged() )
+      Con::executef( this, "onSelectionCentroidChanged" );
 }
 
 void WorldEditor::redirectConsole( S32 objID )

+ 3 - 0
Templates/Empty PhysX/game/tools/worldEditor/scripts/editors/worldEditor.ed.cs

@@ -119,6 +119,9 @@ function WorldEditor::onSelectionCentroidChanged( %this )
 {
    // Inform the camera
    commandToServer('EditorOrbitCameraSelectChange', %this.getSelectionSize(), %this.getSelectionCentroid());
+   
+   // Refresh inspector.
+   Inspector.refresh();
 }
 
 //////////////////////////////////////////////////////////////////////////

+ 3 - 0
Templates/Empty/game/tools/worldEditor/scripts/editors/worldEditor.ed.cs

@@ -119,6 +119,9 @@ function WorldEditor::onSelectionCentroidChanged( %this )
 {
    // Inform the camera
    commandToServer('EditorOrbitCameraSelectChange', %this.getSelectionSize(), %this.getSelectionCentroid());
+   
+   // Refresh inspector.
+   Inspector.refresh();
 }
 
 //////////////////////////////////////////////////////////////////////////

+ 3 - 0
Templates/Full PhysX/game/tools/worldEditor/scripts/editors/worldEditor.ed.cs

@@ -119,6 +119,9 @@ function WorldEditor::onSelectionCentroidChanged( %this )
 {
    // Inform the camera
    commandToServer('EditorOrbitCameraSelectChange', %this.getSelectionSize(), %this.getSelectionCentroid());
+   
+   // Refresh inspector.
+   Inspector.refresh();
 }
 
 //////////////////////////////////////////////////////////////////////////

+ 3 - 0
Templates/Full/game/tools/worldEditor/scripts/editors/worldEditor.ed.cs

@@ -119,6 +119,9 @@ function WorldEditor::onSelectionCentroidChanged( %this )
 {
    // Inform the camera
    commandToServer('EditorOrbitCameraSelectChange', %this.getSelectionSize(), %this.getSelectionCentroid());
+   
+   // Refresh inspector.
+   Inspector.refresh();
 }
 
 //////////////////////////////////////////////////////////////////////////