-
Notifications
You must be signed in to change notification settings - Fork 17
Fixes for collapsed nodes support in main editor view #602
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
Conversation
7a5a5a3 to
5aebc21
Compare
Signed-off-by: Simon Ser <[email protected]>
…hain Signed-off-by: Simon Ser <[email protected]>
TrainrunSectionViewObject will represent multiple trainrun sections soon. Add a helper to get the parent trainrun to reduce reliance on a single trainrun. Signed-off-by: Simon Ser <[email protected]>
This makes it clear that there isn't a single trainrun section per TrainrunSectionViewObject: a single TrainrunSectionViewObject can hold multiple sections. The full collapsed chain is stored. For now, blindly replace trainrunSection with trainrunSections[0], to be cleaned up in future commits. Signed-off-by: Simon Ser <[email protected]>
5aebc21 to
6939966
Compare
Signed-off-by: Simon Ser <[email protected]>
Signed-off-by: Simon Ser <[email protected]>
The TrainrunSectionViewObject already contains the full chain, no need to re-compute it. Signed-off-by: Simon Ser <[email protected]>
6939966 to
2aaeb51
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.
Very nice, it makes the code easier, thanks
The path drawing is still missing some things, but I believe this does not belong to this PR to fix. Already discussed with @Math-R about it:

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.
Thanks for this work. It makes the code cleaner and clearer.
Nit: For getCollapsedChainValueToShow, personally, I would have kept the function as is. Because its signature allows for self-documentation of this part of the code.
|
@Math-R, note that another implementation of the |
See individual commits.
First two commits address #554 (comment)
Rest starts addressing the last paragraph of #554 (review)
Some more follow-up cleanups haven't been written yet.
Note, each time we access
TrainrunSectionViewObject.trainrunSections[0]needs to be re-evaluated to figure out whether we really should grab the first section, or the last one, or compute something over all sections (e.g. travel time).