Skip to content

Commit 7b85b7f

Browse files
authored
Fixed assert when toggling picking render pass (#581)
1 parent e9445b4 commit 7b85b7f

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Sources/Overload/OvEditor/src/OvEditor/Panels/SceneView.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,15 @@ void OvEditor::Panels::SceneView::InitFrame()
115115
selectedActor,
116116
m_highlightedGizmoDirection
117117
});
118+
119+
auto& pickingPass = m_renderer->GetPass<OvEditor::Rendering::PickingRenderPass>("Picking");
120+
121+
// Enable picking pass only when the scene view is hovered, not picking, and not operating the camera
122+
pickingPass.SetEnabled(
123+
IsHovered() &&
124+
!m_gizmoOperations.IsPicking() &&
125+
!m_cameraController.IsOperating()
126+
);
118127
}
119128

120129
OvCore::SceneSystem::Scene* OvEditor::Panels::SceneView::GetScene()
@@ -156,15 +165,6 @@ OvCore::Rendering::SceneRenderer::SceneDescriptor OvEditor::Panels::SceneView::C
156165

157166
void OvEditor::Panels::SceneView::DrawFrame()
158167
{
159-
auto& pickingPass = m_renderer->GetPass<OvEditor::Rendering::PickingRenderPass>("Picking");
160-
161-
// Enable picking pass only when the scene view is hovered, not picking, and not operating the camera
162-
pickingPass.SetEnabled(
163-
IsHovered() &&
164-
!m_gizmoOperations.IsPicking() &&
165-
!m_cameraController.IsOperating()
166-
);
167-
168168
OvEditor::Panels::AViewControllable::DrawFrame();
169169
HandleActorPicking();
170170
}

0 commit comments

Comments
 (0)