Skip to content

Commit

Permalink
Merge pull request #9 from ros-visualization/cleanup_publishers_on_re…
Browse files Browse the repository at this point in the history
…store

Cleaning up publishers on restore
  • Loading branch information
brawner authored Jan 7, 2019
2 parents d87f550 + b9fe3f3 commit 8e0da30
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/rqt_publisher/publisher.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,10 @@ def save_settings(self, plugin_settings, instance_settings):
instance_settings.set_value('publishers', repr(publisher_copies))

def restore_settings(self, plugin_settings, instance_settings):
# If changing perspectives and rqt_publisher is already loaded, we need to clean up the
# previously existing publishers
self.clean_up_publishers()

publishers = eval(instance_settings.value('publishers', '[]'))
for publisher in publishers:
self._add_publisher(publisher)
Expand Down

0 comments on commit 8e0da30

Please sign in to comment.