mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
Removed too generic exception handling
CURA-1278
This commit is contained in:
parent
a33b6c2cd3
commit
ca218d7a1f
1 changed files with 7 additions and 11 deletions
|
@ -32,18 +32,14 @@ class PerObjectSettingsTool(Tool):
|
|||
return selected_object_id
|
||||
|
||||
def getContainerID(self):
|
||||
|
||||
selected_object = Selection.getSelectedObject(0)
|
||||
if selected_object.getParent().callDecoration("isGroup"):
|
||||
selected_object = selected_object.getParent()
|
||||
try:
|
||||
selected_object = Selection.getSelectedObject(0)
|
||||
if selected_object.getParent().callDecoration("isGroup"):
|
||||
selected_object = selected_object.getParent()
|
||||
try:
|
||||
return selected_object.callDecoration("getStack").getId()
|
||||
except:
|
||||
print(":(")
|
||||
return
|
||||
except:
|
||||
print(":((")
|
||||
return
|
||||
return selected_object.callDecoration("getStack").getId()
|
||||
except AttributeError:
|
||||
return ""
|
||||
|
||||
def setContainerID(self, value):
|
||||
pass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue