fix: Correct display update logic for draw_text

This commit is contained in:
ChuckBuilds
2025-04-30 11:13:03 -05:00
parent 64dfa6761e
commit 08ab6f404d
2 changed files with 3 additions and 5 deletions

View File

@@ -265,11 +265,6 @@ class DisplayManager:
# For TTF fonts, use PIL's text drawing
self.draw.text((x, y), text, font=current_font, fill=color)
# Sync the image with the canvas and update display
self.offscreen_canvas.SetImage(self.image)
self.matrix.SwapOnVSync(self.offscreen_canvas, False)
self.offscreen_canvas, self.current_canvas = self.current_canvas, self.offscreen_canvas
except Exception as e:
logger.error(f"Error drawing text: {e}", exc_info=True)

View File

@@ -152,6 +152,9 @@ class TextDisplay:
)
# No need to call update_display here, controller should handle it after calling display
# Add the call to update the display here
self.display_manager.update_display()
# Reset scroll position for next time if not scrolling
# self.last_update_time = time.time() # Reset time tracking if static