Fix T41499: Can't use Deselect/Select All tool while in Texture Paint mode

This commit is contained in:
Sergey Sharybin 2014-08-20 14:00:57 +06:00
parent dcf9bc82d8
commit f11057f54a

@ -169,6 +169,13 @@ class VIEW3D_OT_select_or_deselect_all(Operator):
default=False,
)
@classmethod
def poll(cls, context):
active_object = context.active_object
if active_object:
return active_object.mode in {'EDIT', 'OBJECT', 'POSE'}
return True
def invoke(self, context, event):
x = event.mouse_region_x
y = event.mouse_region_y