Skip to content

Commit

Permalink
Update condition for asking for resolution in Jupyter export dialog.
Browse files Browse the repository at this point in the history
  • Loading branch information
Carifio24 committed Sep 9, 2024
1 parent 0eb1081 commit b924c95
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions glue_ar/jupyter/export_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@

from glue.config import viewer_tool
from glue.viewers.common.tool import Tool
from glue_vispy_viewers.volume.qt.volume_viewer import VispyVolumeViewerMixin

from glue_ar.common.export import export_viewer
from glue_ar.jupyter.export_dialog import JupyterARExportDialog
from glue_ar.utils import AR_ICON, xyz_bounds
from glue_ar.utils import AR_ICON, is_volume_viewer, xyz_bounds

import ipyvuetify as v # noqa
from ipywidgets import HBox, Layout # noqa
Expand Down Expand Up @@ -109,7 +108,7 @@ def on_no_click(button, event, data):
self.viewer.output_widget.clear_output()

def save_figure(self, filepath):
bounds = xyz_bounds(self.viewer.state, with_resolution=isinstance(self.viewer, VispyVolumeViewerMixin))
bounds = xyz_bounds(self.viewer.state, with_resolution=is_volume_viewer(self.viewer))

Check warning on line 111 in glue_ar/jupyter/export_tool.py

View check run for this annotation

Codecov / codecov/patch

glue_ar/jupyter/export_tool.py#L111

Added line #L111 was not covered by tests
layer_states = [layer.state for layer in self.viewer.layers if layer.enabled and layer.state.visible]
state_dict = self.export_dialog.state_dictionary
export_viewer(viewer_state=self.viewer.state,
Expand Down

0 comments on commit b924c95

Please sign in to comment.