Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions doc/changelog.d/354.miscellaneous.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix: Remove buttons in screenshots
2 changes: 1 addition & 1 deletion examples/00-basic-pyvista-examples/plain_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
pl.plot(mesh)

# Show the plotter
pl.show(screenshot="screenshot.png")
pl.show()


######################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,13 @@ def callback(self, state: bool) -> None:
This method provides a callback function for the screenshot widget.
It is called every time the screenshot widget is clicked.
"""
for widget in self.plotter._widgets:
widget._button.GetRepresentation().SetVisibility(0)
self._plotter._pl.scene.render()
self.plotter._pl.scene.screenshot("screenshot.png")
for widget in self.plotter._widgets:
widget._button.GetRepresentation().SetVisibility(1)
self._plotter._pl.scene.render()

def update(self) -> None:
"""Define the configuration and representation of the screenshot widget button."""
Expand Down
Loading