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

Missing parenthesis when displaying coordinates #1522

Closed
Brett208 opened this issue Jan 15, 2025 · 0 comments · Fixed by #1552
Closed

Missing parenthesis when displaying coordinates #1522

Brett208 opened this issue Jan 15, 2025 · 0 comments · Fixed by #1552
Assignees
Labels
bug Something isn't working User Interface Task related to UI development/improvement

Comments

@Brett208
Copy link
Member

When showing the user coordinates to where robots complete or cancel tasks, the leftmost parenthesis and space is missing.

image

MapViewState.cpp

mNotificationArea.push({
	"Robot Task Canceled",
	robot->name() + " canceled its task at" + std::to_string(tile->xy().x) + ", " + std::to_string(tile->xy().y) + ").",
	tile->xyz(),
	NotificationArea::NotificationType::Information

This could be fixed by just adding the parenthesis and spaces in these places.

I think a better fix would be to create a ToString overload on Point and Vector in NAS2D that autoformatted the (x,y). This is slightly complicated by the classes being templates. Then a lot of the manual coded formatting in OPHD could be removed in favor of calling tostring the basic types. NAS2D's Rectangle would probably also benefit from this.

An intermediate solution could be to try to consolidate all the calls to a single helper method in OPHD if NAS2D isn't available to edit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working User Interface Task related to UI development/improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants