Fix collection object mode panels

They were broken since we moved object mode into workspace.
This commit is contained in:
Dalai Felinto 2018-02-19 09:53:39 -03:00
parent 264691e563
commit 30d0194585
1 changed files with 4 additions and 8 deletions

View File

@ -91,8 +91,7 @@ class COLLECTION_PT_object_mode_settings(CollectionButtonsPanel, Panel):
@classmethod
def poll(cls, context):
window = context.window
return window and hasattr(window, 'object_mode') and (window.object_mode == 'OBJECT')
return context.workspace.object_mode == 'OBJECT'
def draw(self, context):
layout = self.layout
@ -110,8 +109,7 @@ class COLLECTION_PT_edit_mode_settings(CollectionButtonsPanel, Panel):
@classmethod
def poll(cls, context):
window = context.window
return window and hasattr(window, 'object_mode') and (window.object_mode == 'EDIT')
return context.workspace.object_mode == 'EDIT'
def draw(self, context):
layout = self.layout
@ -134,8 +132,7 @@ class COLLECTION_PT_paint_weight_mode_settings(CollectionButtonsPanel, Panel):
@classmethod
def poll(cls, context):
window = context.window
return window and hasattr(window, 'object_mode') and (window.object_mode == 'WEIGHT_PAINT')
return context.workspace.object_mode == 'WEIGHT_PAINT'
def draw(self, context):
layout = self.layout
@ -153,8 +150,7 @@ class COLLECTION_PT_paint_vertex_mode_settings(CollectionButtonsPanel, Panel):
@classmethod
def poll(cls, context):
window = context.window
return window and hasattr(window, 'object_mode') and (window.object_mode == 'VERTEX_PAINT')
return context.workspace.object_mode == 'VERTEX_PAINT'
def draw(self, context):
layout = self.layout