SOSCSRPG icon indicating copy to clipboard operation
SOSCSRPG copied to clipboard

Rapid clicking in trading screen causes items row order to switch

Open ScottLilly opened this issue 6 years ago • 2 comments

Rapid clicking in trading screen causes items row order to switch

ScottLilly avatar Jun 18 '20 21:06 ScottLilly

@ScottLilly this is a larger issue. Inventory is an IEnumerable rather than an ObservableCollection, so when the inventory changes we set the Inventory property again to propagate a change, but this type of change is for the whole list so the entire DataGrid refreshes. When done rapidly the items may momentarily move in the UI.

We may need to fix this by using an ObservableCollection instead, so that the individual changes are notified rather than resetting the whole list every click.

I didn't see anything similar to SuspendLayout that could possibly prevent the UI update until we knew our operation was done. Thoughts?

DarthPedro avatar Jul 15 '20 20:07 DarthPedro

I'll look at this over the weekend and let you know what I think. I still have a few days of work cleaning up the code formatting for my site, after the PHP upgrade.

ScottLilly avatar Jul 16 '20 10:07 ScottLilly