From 497f3c96dc10872cbb40a775f8a243fdc138a376 Mon Sep 17 00:00:00 2001 From: DavidWyand-GG Date: Tue, 16 Oct 2012 18:43:11 -0400 Subject: [PATCH] Fix for Issue #90 for Camera orbit object bug --- Engine/source/gui/worldEditor/worldEditor.cpp | 3 +++ .../game/tools/worldEditor/scripts/editors/worldEditor.ed.cs | 3 +++ .../game/tools/worldEditor/scripts/editors/worldEditor.ed.cs | 3 +++ .../game/tools/worldEditor/scripts/editors/worldEditor.ed.cs | 3 +++ .../game/tools/worldEditor/scripts/editors/worldEditor.ed.cs | 3 +++ 5 files changed, 15 insertions(+) diff --git a/Engine/source/gui/worldEditor/worldEditor.cpp b/Engine/source/gui/worldEditor/worldEditor.cpp index 9f4566944..1500e2030 100644 --- a/Engine/source/gui/worldEditor/worldEditor.cpp +++ b/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 ) diff --git a/Templates/Empty PhysX/game/tools/worldEditor/scripts/editors/worldEditor.ed.cs b/Templates/Empty PhysX/game/tools/worldEditor/scripts/editors/worldEditor.ed.cs index bf6e94fa7..95e26e21a 100644 --- a/Templates/Empty PhysX/game/tools/worldEditor/scripts/editors/worldEditor.ed.cs +++ b/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(); } ////////////////////////////////////////////////////////////////////////// diff --git a/Templates/Empty/game/tools/worldEditor/scripts/editors/worldEditor.ed.cs b/Templates/Empty/game/tools/worldEditor/scripts/editors/worldEditor.ed.cs index bf6e94fa7..95e26e21a 100644 --- a/Templates/Empty/game/tools/worldEditor/scripts/editors/worldEditor.ed.cs +++ b/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(); } ////////////////////////////////////////////////////////////////////////// diff --git a/Templates/Full PhysX/game/tools/worldEditor/scripts/editors/worldEditor.ed.cs b/Templates/Full PhysX/game/tools/worldEditor/scripts/editors/worldEditor.ed.cs index bf6e94fa7..95e26e21a 100644 --- a/Templates/Full PhysX/game/tools/worldEditor/scripts/editors/worldEditor.ed.cs +++ b/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(); } ////////////////////////////////////////////////////////////////////////// diff --git a/Templates/Full/game/tools/worldEditor/scripts/editors/worldEditor.ed.cs b/Templates/Full/game/tools/worldEditor/scripts/editors/worldEditor.ed.cs index bf6e94fa7..95e26e21a 100644 --- a/Templates/Full/game/tools/worldEditor/scripts/editors/worldEditor.ed.cs +++ b/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(); } //////////////////////////////////////////////////////////////////////////