diff --git a/GUIElements.py b/GUIElements.py index ba240ad9..3d9ca186 100644 --- a/GUIElements.py +++ b/GUIElements.py @@ -199,6 +199,9 @@ class FCCheckBox(QtGui.QCheckBox): def set_value(self, val): self.setChecked(val) + def toggle(self): + self.set_value(not self.get_value()) + class FCTextArea(QtGui.QPlainTextEdit): def __init__(self, parent=None): diff --git a/ObjectCollection.py b/ObjectCollection.py index 727358df..e423e5dd 100644 --- a/ObjectCollection.py +++ b/ObjectCollection.py @@ -82,6 +82,11 @@ class ObjectCollection(QtCore.QAbstractListModel): # Delete via the application to # ensure cleanup of the GUI self.get_active().app.on_delete() + return + + if key == QtCore.Qt.Key_Space: + self.get_active().ui.plot_cb.toggle() + return def on_mouse_down(self, event): FlatCAMApp.App.log.debug("Mouse button pressed on list")