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

The Show error dialog panel can enter a vicious circle #594

Closed
kianzarrin opened this issue Dec 15, 2019 · 3 comments · Fixed by #615
Closed

The Show error dialog panel can enter a vicious circle #594

kianzarrin opened this issue Dec 15, 2019 · 3 comments · Fixed by #615
Labels
adjustments required An issue require some adjustments in code BUG Defect detected UI User interface updates Usability Make mod easier to use
Milestone

Comments

@kianzarrin
Copy link
Collaborator

kianzarrin commented Dec 15, 2019

see this #538 (comment)

Summary of the problem:
steps to reproduce:
A: user clicks on a wrong segment.
B: error panel is displayed.
C: user presses OK
D: the user click from step C is captured by the TM tool. However the HoveredSegmentID is not updated. This brings us back to step B.

@kianzarrin kianzarrin added BUG Defect detected triage Awaiting issue categorisation labels Dec 15, 2019
@originalfoo
Copy link
Member

Good catch!

@originalfoo originalfoo added adjustments required An issue require some adjustments in code UI User interface updates Usability Make mod easier to use and removed triage Awaiting issue categorisation labels Dec 15, 2019
@originalfoo originalfoo added this to the 11.0 milestone Dec 15, 2019
@kianzarrin
Copy link
Collaborator Author

I think this code maybe responsible:

// https://github.com/kianzarrin/Cities-Skylines-Traffic-Manager-President-Edition/blob/09974a08b5d0e3c241351e61d982f1ad31752691/TLM/TLM/UI/TrafficManagerTool.cs#L827
if (mouseRayValid)
{
    HoveredSegmentId = 0;
    HoveredSegmentId = 0;
     ...
     return HoveredNodeId != 0 || HoveredSegmentId != 0;
}
return false; // mouseRayValid=false here

is there any reason why we don't set HoveredSegmentId and HoveredSegmentId to zero when mouseRay is not valid?

@kianzarrin
Copy link
Collaborator Author

setting HoveredSegmentId and HoveredSegmentId to zero does fix the problem :) (see comment above)

kianzarrin added a commit to kianzarrin/Cities-Skylines-Traffic-Manager-President-Edition that referenced this issue Jan 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adjustments required An issue require some adjustments in code BUG Defect detected UI User interface updates Usability Make mod easier to use
Projects
None yet
2 participants