-
Notifications
You must be signed in to change notification settings - Fork 46
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
front: fix power restrictions reset when editing a train #10134
Conversation
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## dev #10134 +/- ##
==========================================
- Coverage 79.83% 79.81% -0.02%
==========================================
Files 1054 1054
Lines 105547 105537 -10
Branches 726 726
==========================================
- Hits 84261 84237 -24
- Misses 21244 21258 +14
Partials 42 42
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
d559bd8
to
cb3ecb6
Compare
Add a state value isInitialized to avoid reseting the power restrictions when editing a train. Indeed, the pathfinding was launched by the 2 hooks (with infra and rollingStock), which reset the power restrictions, even when the user was editing a train. Now it won't be the case anymore. Signed-off-by: Clara Ni <clara.ni@outlook.fr>
cb3ecb6
to
fb011a4
Compare
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.
Tested, LGTM, ty for this fix.
Also I have a question, not directly linked to this PR, do you know if this is the expected behavior when places where power restrictions are cut create vias?
Thanks @Akctarus ! Yes, it is the expected behavior for now, because to add power restriction in the backend, we need to locate them with pathsteps ids ;) |
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.
LGTM
closes #9902
To test: