From 9ba4a35bcab9eede4fd5c9b01dbd6998889dc0e3 Mon Sep 17 00:00:00 2001 From: DavidWyand-GG Date: Tue, 16 Oct 2012 12:30:54 -0400 Subject: [PATCH] Fix for Issue #88 for River Editor Snapping --- Engine/source/environment/editors/guiRiverEditorCtrl.cpp | 7 +++++-- Engine/source/environment/editors/guiRiverEditorCtrl.h | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Engine/source/environment/editors/guiRiverEditorCtrl.cpp b/Engine/source/environment/editors/guiRiverEditorCtrl.cpp index 527c53b3a..18f49b0e6 100644 --- a/Engine/source/environment/editors/guiRiverEditorCtrl.cpp +++ b/Engine/source/environment/editors/guiRiverEditorCtrl.cpp @@ -225,13 +225,16 @@ void GuiRiverEditorCtrl::get3DCursor( GuiCursor *&cursor, void GuiRiverEditorCtrl::on3DMouseDown(const Gui3DMouseEvent & event) { - + _process3DMouseDown( event ); mGizmo->on3DMouseDown( event ); if ( !isFirstResponder() ) setFirstResponder(); - +} + +void GuiRiverEditorCtrl::_process3DMouseDown( const Gui3DMouseEvent& event ) +{ // Get the raycast collision position Point3F tPos; if ( !getStaticPos( event, tPos ) ) diff --git a/Engine/source/environment/editors/guiRiverEditorCtrl.h b/Engine/source/environment/editors/guiRiverEditorCtrl.h index a8320eb16..978f6ed86 100644 --- a/Engine/source/environment/editors/guiRiverEditorCtrl.h +++ b/Engine/source/environment/editors/guiRiverEditorCtrl.h @@ -121,6 +121,7 @@ class GuiRiverEditorCtrl : public EditTSCtrl void _prepRenderImage( SceneManager* sceneGraph, const SceneRenderState* sceneState ); void _drawRiverSpline( River *river, const ColorI &color ); void _drawRiverControlNodes( River *river, const ColorI &color ); + void _process3DMouseDown( const Gui3DMouseEvent& event ); void submitUndo( const UTF8 *name = "Action" );