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

Option to call load_config service without triggering "There are unsaved changes" dialogue? #1709

Closed
FSund opened this issue Feb 6, 2022 · 1 comment · Fixed by #1710
Closed

Comments

@FSund
Copy link
Contributor

FSund commented Feb 6, 2022

Calling the load_service service nearly always triggers a "There are unsaved changes" dialogue.

image

An option (perhaps via an additional field in the service definition) to always discard changes would be nice for our workflow.

@FSund
Copy link
Contributor Author

FSund commented Feb 6, 2022

I've had a look at the code, and it seems like this shouldn't require too many changes. Looks like a if (!discard_changes) around this prepareToExit() call should do the trick:
https://github.com/ros-visualization/rviz/blob/noetic-devel/src/rviz/visualization_frame.cpp#L750

This would mean adding a discard_changes argument to VisualizationFrame::loadDisplayConfigHelper.

I thought about adding a discard_changes field to SendFilePath.srv, but that seems like it should rather be a new service. Perhaps something like LoadConfig.srv

std_msgs/String path # absolute path to file or directory
bool discard_changes # discard changes to RViz config
---
bool success

The main issue is how to implement this sercice. I'm guessing changing the service type of load_config is not an option, since it would be a breaking change?

I could always make a new service like load_config_discard_changes or similarly, but that might pollute the namespace too much?

Let me know if you have any suggestions, and I'll try to make a proper PR.

@rhaschke rhaschke linked a pull request Feb 6, 2022 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant