Refactor new editor boundaries and test ownership
This commit is contained in:
@@ -488,16 +488,17 @@ UIEditorHostCommandDispatchResult HierarchyPanel::DispatchEditCommand(
|
||||
void HierarchyPanel::ProcessDragAndFrameEvents(
|
||||
const std::vector<UIInputEvent>& inputEvents,
|
||||
const UIRect& bounds,
|
||||
bool allowInteraction,
|
||||
bool panelActive) {
|
||||
const std::vector<UIInputEvent> filteredEvents = FilterUIEditorTreePanelInputEvents(
|
||||
const PanelInputContext& inputContext) {
|
||||
const std::vector<UIInputEvent> filteredEvents = BuildUIEditorTreePanelInputEvents(
|
||||
bounds,
|
||||
inputEvents,
|
||||
UIEditorTreePanelInputFilterOptions{
|
||||
.allowInteraction = allowInteraction,
|
||||
.panelActive = panelActive,
|
||||
.allowInteraction = inputContext.allowInteraction,
|
||||
.hasInputFocus = inputContext.hasInputFocus,
|
||||
.captureActive = HasActivePointerCapture()
|
||||
});
|
||||
},
|
||||
inputContext.focusGained,
|
||||
inputContext.focusLost);
|
||||
|
||||
if (m_treeFrame.result.selectionChanged) {
|
||||
SyncSceneRuntimeSelectionFromTree();
|
||||
@@ -570,8 +571,7 @@ void HierarchyPanel::ProcessDragAndFrameEvents(
|
||||
void HierarchyPanel::Update(
|
||||
const UIEditorPanelContentHostFrame& contentHostFrame,
|
||||
const std::vector<UIInputEvent>& inputEvents,
|
||||
bool allowInteraction,
|
||||
bool panelActive) {
|
||||
const PanelInputContext& inputContext) {
|
||||
ResetTransientState();
|
||||
|
||||
const UIEditorPanelContentHostPanelState* panelState =
|
||||
@@ -593,16 +593,18 @@ void HierarchyPanel::Update(
|
||||
}
|
||||
|
||||
m_visible = true;
|
||||
const std::vector<UIInputEvent> filteredEvents = FilterUIEditorTreePanelInputEvents(
|
||||
const std::vector<UIInputEvent> filteredEvents = BuildUIEditorTreePanelInputEvents(
|
||||
panelState->bounds,
|
||||
inputEvents,
|
||||
UIEditorTreePanelInputFilterOptions{
|
||||
.allowInteraction = allowInteraction,
|
||||
.panelActive = panelActive,
|
||||
.allowInteraction = inputContext.allowInteraction,
|
||||
.hasInputFocus = inputContext.hasInputFocus,
|
||||
.captureActive = HasActivePointerCapture()
|
||||
});
|
||||
},
|
||||
inputContext.focusGained,
|
||||
inputContext.focusLost);
|
||||
SyncTreeFocusState(filteredEvents);
|
||||
ClaimCommandFocus(filteredEvents, panelState->bounds, allowInteraction);
|
||||
ClaimCommandFocus(filteredEvents, panelState->bounds, inputContext.allowInteraction);
|
||||
|
||||
const Widgets::UIEditorTreeViewMetrics treeMetrics =
|
||||
ResolveUIEditorTreeViewMetrics();
|
||||
@@ -648,8 +650,7 @@ void HierarchyPanel::Update(
|
||||
ProcessDragAndFrameEvents(
|
||||
inputEvents,
|
||||
panelState->bounds,
|
||||
allowInteraction,
|
||||
panelActive);
|
||||
inputContext);
|
||||
}
|
||||
|
||||
void HierarchyPanel::Append(UIDrawList& drawList) const {
|
||||
|
||||
Reference in New Issue
Block a user