From d48709badbe5b78136fd8c32e7d5d79b97c8c564 Mon Sep 17 00:00:00 2001 From: MaisimZaman <81390092+MaisimZaman@users.noreply.github.com> Date: Thu, 24 Aug 2023 23:05:24 -0400 Subject: [PATCH] Added and fixed clear button (#121) Added a dashboard 'Clear' button --- sinks/dashboard/dashboard.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sinks/dashboard/dashboard.py b/sinks/dashboard/dashboard.py index 409f2388..a984cf3a 100644 --- a/sinks/dashboard/dashboard.py +++ b/sinks/dashboard/dashboard.py @@ -137,6 +137,13 @@ def return_fun(): new_action = add_item_menu.addAction(registry.get_items()[i].get_name()) new_action.triggered.connect(create_registry_trigger(i)) self.lockableActions.append(new_action) + + + #adding a button to the dashboard that removes all dashitems on the screen + remove_dashitems = menubar.addMenu("Clear") + remove_dashitems_action = remove_dashitems.addAction("Remove all the dashitems") + remove_dashitems_action.triggered.connect(self.remove_all) + self.lockableActions.append(remove_dashitems_action) # Add an action to the menu bar to save the # layout of the dashboard.