weixin_39945792
weixin_39945792
2021-01-12 01:40

bad AIM (advanced item menu) sort order stability during movement

In most of the recent builds when I use aim to move one item from a stack in a dragged vehicle to another location, the stack will often jump suddenly so that I can no longer just hit "enter" and reliably watch the stack count decrement. At any time during the decrementing process the stack can "jump out of" being selected. I believe while this problem happens at other times, when I notice it most is when I move things to and from a dragged vehicle. I notice often the item selection jumps to a different location long before its count of items has been depleted when holding down "enter" to move it.

In essence, moving items from pane to pane should never affect the sort order. But now it appears to do so. If it matters, I tend to use 'c'ategory sort order.

该提问来源于开源项目:CleverRaven/Cataclysm-DDA

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

5条回答

  • weixin_39719727 weixin_39719727 4月前

    Could be solved by moving the last item from the stack first rather than the first item.

    In default sort order and category sort order, item order is determined by the first item of the type. For example, skewer,rock,rock,skewer will have skewer before rock. After moving the first skewer, rock x2 is now before the second skewer. By moving the last item first, the first item of the type would remain in its position and so order would be preserved.

    点赞 评论 复制链接分享
  • weixin_39742065 weixin_39742065 4月前

    Yeah, before the recent AIM overhaul, items were alphabetical under category sort. Maybe that could be reverted, or switched to a toggle?

    点赞 评论 复制链接分享
  • weixin_39719727 weixin_39719727 4月前

    It is supposed to be fixing them alphabetically too. Not sure why doesn't it work. The sort function used is std::stable_sort, it first sorts by category and then lexicographically.

    Categories are inserted and sorted as if they were items, so no way to maneuver there.

    Any ideas?

    点赞 评论 复制链接分享
  • weixin_39945792 weixin_39945792 4月前

    I'm happy to say in 0.C-3068 cb7dabb this issue appears to be resolved, or at least, I can no longer trivially duplicate it.

    点赞 评论 复制链接分享
  • weixin_39719727 weixin_39719727 4月前

    Oops, I merged BevapDin's fix, but forgot to close the issue.

    点赞 评论 复制链接分享

相关推荐