Skip to content

Commit

Permalink
make status update consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
X-sam committed Jul 8, 2024
1 parent bb92a2c commit 9fcfa38
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/main/python/main/ayab/ayab.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,7 @@ def set_image_dimensions(self) -> None:
width, height = self.scene.ayabimage.image.size
self.engine.config.update_needles() # in case machine width changed
self.engine.config.set_image_dimensions(width, height)
self.progbar.row = self.scene.row_progress + 1
self.progbar.total = height
self.progbar.refresh()
self.progbar.update(self.engine.status)
self.notify(
QCoreApplication.translate("Scene", "Image dimensions")
+ f": {width} x {height}",
Expand All @@ -191,8 +189,9 @@ def reverse_image(self) -> None:
self.scene.reverse()

def update_start_row(self, start_row: int) -> None:
self.progbar.update(start_row)
self.scene.row_progress = start_row
self.engine.status.current_row = start_row
self.progbar.update(self.engine.status)

def notify(self, text: str, log: bool = True) -> None:
"""Update the notification field."""
Expand Down

0 comments on commit 9fcfa38

Please sign in to comment.