Skip to content

Commit

Permalink
remember info-text visibility in layout-editor
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelquast committed Dec 1, 2023
1 parent e14082a commit 6e043ad
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions eomaps/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1303,11 +1303,22 @@ def _add_revert_props(self, child, *args):
)

def refetch_axes_images(self):
# remember visibility of info-textbox
if self._info_text and self._info_text.get_visible() is False:
info_txt_hidden = True

Check warning on line 1308 in eomaps/helpers.py

View check run for this annotation

Codecov / codecov/patch

eomaps/helpers.py#L1307-L1308

Added lines #L1307 - L1308 were not covered by tests
else:
info_txt_hidden = False

Check warning on line 1310 in eomaps/helpers.py

View check run for this annotation

Codecov / codecov/patch

eomaps/helpers.py#L1310

Added line #L1310 was not covered by tests

self.m.redraw()
self._undo_draggable()
self.m.f.canvas.draw()
self._make_draggable()

Check warning on line 1315 in eomaps/helpers.py

View check run for this annotation

Codecov / codecov/patch

eomaps/helpers.py#L1312-L1315

Added lines #L1312 - L1315 were not covered by tests

# hide info-text in case it was hidden before
if self._info_text and info_txt_hidden:
self._info_text.set_visible(False)
self._info_text_hidden = True

Check warning on line 1320 in eomaps/helpers.py

View check run for this annotation

Codecov / codecov/patch

eomaps/helpers.py#L1318-L1320

Added lines #L1318 - L1320 were not covered by tests

def _undo_draggable(self):
self.modifier_pressed = False

Expand Down

0 comments on commit 6e043ad

Please sign in to comment.