-
Notifications
You must be signed in to change notification settings - Fork 329
FIX: ISXB-1013-prevent-ui-update-loop #1984
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
95e0712
ee22064
c2728f5
7f4d89d
be2d686
8515518
06908e9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -135,11 +135,6 @@ public ActionsTreeView(VisualElement root, StateContainer stateContainer) | |
var item = m_ActionsTreeView.GetItemDataForIndex<ActionOrBindingData>(m_ActionsTreeView.selectedIndex); | ||
Dispatch(item.isAction ? Commands.SelectAction(item.name) : Commands.SelectBinding(item.bindingIndex)); | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess this is safe, the problem here is that there seem to be two related but separate concepts of selection, one in the UI model part of the UITK controls and one in the custom model part of this repo. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My only worry is that when the number of actions goes down to zero, as in deleting the last action form a map, the UI might be without selection but the State model might have a selection so they are out of sync. I suspect the loop is due to the below commands when being handled by the UI code do not skip further processing if the UI model and this custom selection model are actually equal. E.g. that else should maybe be an else if checking if the selections are not in sync. |
||
else | ||
{ | ||
Dispatch(Commands.SelectAction(null)); | ||
Dispatch(Commands.SelectBinding(-1)); | ||
} | ||
}; | ||
|
||
m_ActionsTreeView.RegisterCallback<ExecuteCommandEvent>(OnExecuteCommand); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would suggest describing the symptom and the actual issue happening that was fixed here instead or what do you think?