From 322788133b98944d5600eb032acc79169d25ef6a Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Tue, 26 Jan 2021 20:23:52 +1000 Subject: [PATCH] tooltip() instead of print() when no tts tag matches Can help with debugging user error like an incorrectly-typed language code. Don't ask me how I know. :-) --- qt/aqt/sound.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qt/aqt/sound.py b/qt/aqt/sound.py index 19e5fe26a..6e53bf8fa 100644 --- a/qt/aqt/sound.py +++ b/qt/aqt/sound.py @@ -35,6 +35,7 @@ from aqt.utils import ( saveGeom, showWarning, startup_info, + tooltip, tr, ) @@ -208,7 +209,7 @@ class AVPlayer: gui_hooks.av_player_will_play(tag) self.current_player.play(tag, self._on_play_finished) else: - print("no players found for", tag) + tooltip(f"no players found for {tag}") def _best_player_for_tag(self, tag: AVTag) -> Optional[Player]: ranked = []