Skip to content
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

[Bug]: In "Rule settings" dialog, when selecting several routing rules, the exported json's content depends on order of selection! #6377

Closed
2 tasks done
OnceUponATimeInAmerica opened this issue Dec 30, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@OnceUponATimeInAmerica
Copy link
Contributor

OnceUponATimeInAmerica commented Dec 30, 2024

预期情况

The exported json containing routing rules should reflect their order in the "Rule list" and NOT on order of their selection (by keyboard)

实际情况

The exported json's ordering of routing-rule items depends on how the items were selected in the UI using keyboard which is counterintuitive and unexpected. For example, the last rule can appear first in the copied content! (depending on how items were selected)

复现方法

Go to Settings > Routing Setting > dbl-click on a routing rule-list to open the "Rule Settings" dialog > Go to bottom of the rule list and click on last-item (to select it) then click on item-before-last > Right-click and select "Export Selected Rules" > Paste the clipboard content into Notepad and observe that the order is reversed from the order in rule-list!

日志信息

N/A

额外信息

No response

我确认已更新至最新版本

我确认已查询历史issues

@OnceUponATimeInAmerica OnceUponATimeInAmerica added the bug Something isn't working label Dec 30, 2024
@2dust
Copy link
Owner

2dust commented Dec 30, 2024

This is because the events, data and selection order of the grid control are related.

@OnceUponATimeInAmerica OnceUponATimeInAmerica changed the title [Bug]: In "Rule settings" window, when selecting several routing items, the exported json's content depends on order of selection! [Bug]: In "Rule settings" dialog, when selecting several routing rules, the exported json's content depends on order of selection! Dec 30, 2024
@OnceUponATimeInAmerica
Copy link
Contributor Author

OnceUponATimeInAmerica commented Dec 30, 2024

Perhaps matching the selected rules (in grid control) against rules from the database, based on rule id (which rules have been selected?) and then copying to clipboard from the database itself (in which the order of the rules is also preserved) can work?

2dust added a commit that referenced this issue Dec 31, 2024
@2dust
Copy link
Owner

2dust commented Jan 1, 2025

@2dust 2dust closed this as completed Jan 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants