From 08ab6f404daa5572c56704b64be1144bd9903191 Mon Sep 17 00:00:00 2001 From: ChuckBuilds <33324927+ChuckBuilds@users.noreply.github.com> Date: Wed, 30 Apr 2025 11:13:03 -0500 Subject: [PATCH] fix: Correct display update logic for draw_text --- src/display_manager.py | 5 ----- src/text_display.py | 3 +++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/display_manager.py b/src/display_manager.py index 0fea2f37..1c23ae16 100644 --- a/src/display_manager.py +++ b/src/display_manager.py @@ -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) diff --git a/src/text_display.py b/src/text_display.py index 9438a3a6..55d9d542 100644 --- a/src/text_display.py +++ b/src/text_display.py @@ -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