Skip to content

Commit

Permalink
Image opening bug fixed (v1.0.2)
Browse files Browse the repository at this point in the history
  • Loading branch information
TimNekk committed Jul 31, 2022
1 parent 1c8aa33 commit 2151c7a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions gigapixel/gigapixel.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,12 @@ def __init__(self, app: Application):

@log("Opening photo: {}", "Photo opened", format=(1,), level=Level.DEBUG)
def open_photo(self, photo_path: Path) -> None:
self._main_window.set_focus()
send_keys('^o')
clipboard.copy(str(photo_path))
send_keys('^v {ENTER}')
while photo_path.name not in self._main_window.element_info.name:
logger.debug("Trying to open photo")
self._main_window.set_focus()
send_keys('{ESC}^o')
clipboard.copy(str(photo_path))
send_keys('^v {ENTER}')

@log("Saving photo", "Photo saved", level=Level.DEBUG)
def save_photo(self) -> None:
Expand Down

0 comments on commit 2151c7a

Please sign in to comment.