This commit is contained in:
yumoqing 2020-12-04 23:24:22 +08:00
parent 09d6372b15
commit 29bdc3293d

View File

@ -73,6 +73,8 @@ class BGColorBehavior(object):
def selected(self): def selected(self):
if self.useOwnColor: if self.useOwnColor:
if self.bgcolor == self.selected_bgcolor:
return
self.bgcolor = self.selected_bgcolor self.bgcolor = self.selected_bgcolor
self.color = self.fgcolor = self.selected_fgcolor self.color = self.fgcolor = self.selected_fgcolor
self.on_bgcolor() self.on_bgcolor()
@ -81,6 +83,8 @@ class BGColorBehavior(object):
def unselected(self): def unselected(self):
if self.useOwnColor: if self.useOwnColor:
if self.bgcolor == self.normal_bgcolor:
return
self.bgcolor = self.normal_bgcolor self.bgcolor = self.normal_bgcolor
self.color = self.fgcolor = self.normal_fgcolor self.color = self.fgcolor = self.normal_fgcolor
self.on_bgcolor() self.on_bgcolor()