Skip to content

Commit

Permalink
Update button state logic
Browse files Browse the repository at this point in the history
  • Loading branch information
sea-bass committed Sep 27, 2024
1 parent bcc79b6 commit 96ce25e
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions pyrobosim/pyrobosim/gui/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,16 +257,17 @@ def set_buttons_during_action(self, state):
:param state: Desired button state (True to enable, False to disable)
:type state: bool
"""
self.nav_button.setEnabled(state)
self.pick_button.setEnabled(state)
self.place_button.setEnabled(state)
self.detect_button.setEnabled(state)
self.open_button.setEnabled(state)
self.close_button.setEnabled(state)
self.rand_pose_button.setEnabled(state)
self.cancel_action_button.setEnabled(not state)
self.reset_world_button.setEnabled(state and self.world.source_file is not None)
self.reset_path_planner_button.setEnabled(state)
if self.get_current_robot():
self.nav_button.setEnabled(state)
self.pick_button.setEnabled(state)
self.place_button.setEnabled(state)
self.detect_button.setEnabled(state)
self.open_button.setEnabled(state)
self.close_button.setEnabled(state)
self.rand_pose_button.setEnabled(state)
self.cancel_action_button.setEnabled(not state)
self.reset_world_button.setEnabled(state and self.world.source_file is not None)
self.reset_path_planner_button.setEnabled(state)

####################
# Button Callbacks #
Expand Down

0 comments on commit 96ce25e

Please sign in to comment.