From 2e976967ea6e56bcd607e67b90951dca31a1b405 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Tue, 27 Oct 2020 11:29:57 +0800 Subject: [PATCH] bugfix --- kivyblocks/bgcolorbehavior.py | 4 ++-- kivyblocks/newvideo.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kivyblocks/bgcolorbehavior.py b/kivyblocks/bgcolorbehavior.py index 5fdda57..9669f18 100644 --- a/kivyblocks/bgcolorbehavior.py +++ b/kivyblocks/bgcolorbehavior.py @@ -61,6 +61,8 @@ class BGColorBehavior(object): Color(*self.bgcolor) self.rect = Rectangle(pos=self.pos, size=self.size) + else: + print('on_bgcolor():self.canvas is None') def selected(self): if self.useOwnColor: @@ -68,7 +70,6 @@ class BGColorBehavior(object): self.color = self.fgcolor = self.selected_fgcolor self.on_bgcolor() else: - print('BGColorBehavior():selected(),useAcestorColor()') self.useAcestorColor(selected=True) def unselected(self): @@ -77,5 +78,4 @@ class BGColorBehavior(object): self.color = self.fgcolor = self.normal_fgcolor self.on_bgcolor() else: - print('BGColorBehavior():unselected(),useAcestorColor()') self.useAcestorColor(selected=False) diff --git a/kivyblocks/newvideo.py b/kivyblocks/newvideo.py index 43e6856..024a91f 100644 --- a/kivyblocks/newvideo.py +++ b/kivyblocks/newvideo.py @@ -35,5 +35,5 @@ class NewVideo(BGColorBehavior, Video): logger_func[level]('yffpyplayer: {}'.format(msg)) def audioswitch(self,btn=None): - x = self._video._ffplayer.request_channel('audio') + x = self._ffplayer.request_channel('audio')