diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 89d80e752..8c50946ca 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/ambv/black - rev: 21.5b0 + rev: 22.3.0 hooks: - id: black language_version: python3 diff --git a/nexus_constructor/instrument_view/qentity_utils.py b/nexus_constructor/instrument_view/qentity_utils.py index d34a8de49..e39c453c0 100644 --- a/nexus_constructor/instrument_view/qentity_utils.py +++ b/nexus_constructor/instrument_view/qentity_utils.py @@ -55,7 +55,7 @@ def __init__(self, parent, picker=True): def switch_to_highlight(self): for c in self.components(): - if isinstance(type(c), type(self.hoover_material)): + if isinstance(c, Qt3DExtras.QGoochMaterial): if c != self.hoover_material: self.true_material = c self.removeComponent(c) @@ -63,7 +63,7 @@ def switch_to_highlight(self): def switch_to_normal(self): for c in self.components(): - if isinstance(type(c), type(self.hoover_material)): + if isinstance(c, Qt3DExtras.QGoochMaterial): self.removeComponent(self.hoover_material) self.addComponent(self.true_material)