mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-10 09:39:00 +08:00
Removed too generic exception handling
CURA-1278
This commit is contained in:
parent
a33b6c2cd3
commit
ca218d7a1f
@ -32,18 +32,14 @@ class PerObjectSettingsTool(Tool):
|
|||||||
return selected_object_id
|
return selected_object_id
|
||||||
|
|
||||||
def getContainerID(self):
|
def getContainerID(self):
|
||||||
|
|
||||||
|
selected_object = Selection.getSelectedObject(0)
|
||||||
|
if selected_object.getParent().callDecoration("isGroup"):
|
||||||
|
selected_object = selected_object.getParent()
|
||||||
try:
|
try:
|
||||||
selected_object = Selection.getSelectedObject(0)
|
return selected_object.callDecoration("getStack").getId()
|
||||||
if selected_object.getParent().callDecoration("isGroup"):
|
except AttributeError:
|
||||||
selected_object = selected_object.getParent()
|
return ""
|
||||||
try:
|
|
||||||
return selected_object.callDecoration("getStack").getId()
|
|
||||||
except:
|
|
||||||
print(":(")
|
|
||||||
return
|
|
||||||
except:
|
|
||||||
print(":((")
|
|
||||||
return
|
|
||||||
|
|
||||||
def setContainerID(self, value):
|
def setContainerID(self, value):
|
||||||
pass
|
pass
|
||||||
|
Loading…
x
Reference in New Issue
Block a user