Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Resolve not working buttons. #581

Merged
merged 1 commit into from
Aug 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions src/ansys/meshing/prime/graphics/graphics.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ def __call__(
else:
self.show(update)

def __color_by_type_callback(self): # pragma: no cover
def __color_by_type_callback(self, button_value: bool): # pragma: no cover
"""Determine the color of a type in the callback."""
vr = self._colorByTypeBt.GetRepresentation()
state = vr.GetState()
Expand All @@ -510,7 +510,7 @@ def __color_by_type_callback(self): # pragma: no cover
for disp_mesh in data["faces"]
]

def __hide_unhide_selection(self): # pragma: no cover
def __hide_unhide_selection(self, button_value: bool): # pragma: no cover
"""Hide or unhide the clicked component."""
sel_disp_mesh = self._picker.selections
if len(sel_disp_mesh) > 0:
Expand Down Expand Up @@ -601,7 +601,6 @@ def show(self, update=False):
if self._sphinx_build == False:
self._colorByTypeBt = self._plotter.add_checkbox_button_widget(
self.__color_by_type_callback,
value=int(self._color_by_type) is ColorByType.ZONELET,
position=(10, 700),
size=30,
border_size=3,
Expand Down Expand Up @@ -683,7 +682,6 @@ def __draw_parts(self, parts: List = [], update: bool = False, spline: bool = Fa
if self._sphinx_build == False:
self._colorByTypeBt = self._plotter.add_checkbox_button_widget(
self.__color_by_type_callback,
value=self._color_by_type is ColorByType.ZONELET,
position=(10, 700),
size=30,
border_size=3,
Expand Down Expand Up @@ -751,7 +749,6 @@ def __draw_scope_parts(self, update=False, scope: prime.ScopeDefinition = None):
if self._sphinx_build == False:
self._colorByTypeBt = self._plotter.add_checkbox_button_widget(
self.__color_by_type_callback,
value=self._color_by_type is ColorByType.ZONELET,
position=(10, 700),
size=30,
border_size=3,
Expand Down
Loading