Browse Source

Update where toggle check is implemented
Remove the togglegrid function

weinand 9 years ago
parent
commit
b460a66d12
1 changed files with 5 additions and 9 deletions
  1. 5 9
      Source/AtomicEditor/Editors/SceneEditor3D/SceneView3D.cpp

+ 5 - 9
Source/AtomicEditor/Editors/SceneEditor3D/SceneView3D.cpp

@@ -361,14 +361,6 @@ bool SceneView3D::MouseInView()
 
 }
 
-void SceneView3D::ToggleGrid()
-{
-    Input* input = GetSubsystem<Input>();
-
-    if (input->GetKeyPress(KEY_G))
-        gridEnabled_ = !gridEnabled_;
-}
-
 void SceneView3D::HandleUIUnhandledShortcut(StringHash eventType, VariantMap& eventData)
 {
     if (!enabled_)
@@ -514,8 +506,12 @@ bool SceneView3D::OnEvent(const TBWidgetEvent &ev)
         }
     }
     if (ev.type == EVENT_TYPE_KEY_DOWN)
-        ToggleGrid();
+    {
+        Input* input = GetSubsystem<Input>();
 
+        if (input->GetKeyPress(KEY_G))
+            gridEnabled_ = !gridEnabled_;
+    }
     return sceneEditor_->OnEvent(ev);
 }