Skip to content

Commit

Permalink
clearing label images
Browse files Browse the repository at this point in the history
  • Loading branch information
KingKnecht authored and dickreuter committed Dec 7, 2023
1 parent f89ab27 commit ad8615a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions poker/scraper/table_setup_actions_and_signals.py
Expand Up @@ -8,7 +8,7 @@
from PIL import Image
from PIL.ImageQt import ImageQt
from PyQt6 import QtGui, QtWidgets
from PyQt6.QtCore import Qt, QObject, pyqtSlot, pyqtSignal, QTimer
from PyQt6.QtCore import Qt, QObject, pyqtSlot, pyqtSignal, QTimer, QCoreApplication
from PyQt6.QtWidgets import QMessageBox, QSlider

from poker.tools import constants as const
Expand Down Expand Up @@ -486,7 +486,10 @@ def take_screenshot(self):
"""Take a screenshot"""
log.info("Clearing window")

self._update_preview_label(Image.new('RGB', (3, 3)))
# avoid having a screenshot of the form containing a screenshot of the poker window icon.
self.ui.preview_label.clear()
self.ui.screenshot_label.clear()
QCoreApplication.processEvents()

log.info("Taking screenshot")
config = get_config()
Expand Down

0 comments on commit ad8615a

Please sign in to comment.