diff --git a/source/Panel/BehaviorList/BehaviorList.tsx b/source/Panel/BehaviorList/BehaviorList.tsx index cb3989b..b9674d5 100644 --- a/source/Panel/BehaviorList/BehaviorList.tsx +++ b/source/Panel/BehaviorList/BehaviorList.tsx @@ -45,9 +45,9 @@ class BehaviorList extends Component { diff --git a/source/Panel/GroupDetails/GroupDetails.tsx b/source/Panel/GroupDetails/GroupDetails.tsx index 5108e95..2ff750b 100644 --- a/source/Panel/GroupDetails/GroupDetails.tsx +++ b/source/Panel/GroupDetails/GroupDetails.tsx @@ -1,6 +1,7 @@ import { Component, ReactNode } from "react"; import { AttrInput } from "@Component/AttrInput/AttrInput"; -import { useStatusWithEvent, IMixinStatusProps, Status } from "@Context/Status"; +import { useStatusWithEvent, IMixinStatusProps } from "@Context/Status"; +import { useSetting, IMixinSettingProps } from "@Context/Setting"; import { Message } from "@Component/Message/Message"; import { ObjectID } from "@Model/Renderer"; import { ColorInput } from "@Component/ColorInput/ColorInput"; @@ -25,11 +26,12 @@ const allOption: IDisplayItem[] = [ {nameKey: "Common.Attr.Key.Generation.Mod.Range", key: GenMod.Range} ]; +@useSetting @useStatusWithEvent( "groupAttrChange", "groupLabelChange", "focusObjectChange", "focusBehaviorChange", "behaviorChange", "groupBehaviorChange" ) -class GroupDetails extends Component { +class GroupDetails extends Component { private renderFrom(group: Group) { return <> @@ -122,6 +124,9 @@ class GroupDetails extends Component { }} action={(behavior) => { this.props.status?.setBehaviorObject(behavior); + setTimeout(() => { + this.props.setting?.layout.focus("BehaviorDetails"); + }); }} delete={(behavior) => { this.props.status?.deleteGroupBehavior(group.id, behavior);