Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaime van Kessel <nallath@gmail.com>2016-04-28 18:30:14 +0300
committerJaime van Kessel <nallath@gmail.com>2016-04-28 18:30:14 +0300
commit978536162cc80f552efc704c8f1ae0d30996b5d0 (patch)
tree36731521c7ce76c732121834ad9b5aa12c4698f7 /cura/MachineActionManager.py
parent633d14d92585e67749b736b0f400af3d1066472d (diff)
Save reference to the action instead of key
CURA-1385
Diffstat (limited to 'cura/MachineActionManager.py')
-rw-r--r--cura/MachineActionManager.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/cura/MachineActionManager.py b/cura/MachineActionManager.py
index b8d1c4f9b2..e3cdb690dd 100644
--- a/cura/MachineActionManager.py
+++ b/cura/MachineActionManager.py
@@ -15,13 +15,14 @@ class MachineActionManager:
## Dict of all actions that need to be done when first added by machine reference.
self._first_start_actions = {}
- ## Add a required action
+ ## Add a required action to a machine
+ # Raises an exception when the action is not recognised.
def addRequiredAction(self, machine, action_key):
if action_key in self._machine_actions:
if machine in self._required_actions:
- self._required_actions[machine].append(action_key)
+ self._required_actions[machine].append(self._machine_actions[action_key])
else:
- self._required_actions[machine] = set(action_key)
+ self._required_actions[machine] = set(self._machine_actions[action_key])
else:
# Todo: define specific Exception types (instead of general type)
raise Exception("Action %s, which is required for %s is not known." % (action_key, machine.getKey()))