Draft: gui_utils.py fix error in select function (#19539)
* Draft: gui_utils.py fix error in select function PR #18795 changed the select function to also handle tuples. This PR adds a check to ensure the referenced objects in the tuple still exist before calling `Gui.Selection.addSelection()`.
This commit is contained in:
@@ -389,6 +389,14 @@ def tolerance():
|
||||
return 10 ** -precision()
|
||||
|
||||
|
||||
def is_deleted(obj):
|
||||
"""Return `True` if obj is deleted."""
|
||||
try:
|
||||
return not obj.isAttachedToDocument()
|
||||
except:
|
||||
return True
|
||||
|
||||
|
||||
def get_real_name(name):
|
||||
"""Strip the trailing numbers from a string to get only the letters.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user