start animation only if checkbox is visible

This commit is contained in:
iLLiCiTiT 2021-11-18 19:30:06 +01:00
parent 227afc9b37
commit 29997bb781

View file

@ -150,7 +150,7 @@ class NiceCheckbox(QtWidgets.QFrame):
if self._animation_timer.isActive():
self._animation_timer.stop()
if self.isEnabled():
if self.isVisible() and self.isEnabled():
# Start animation
self._animation_timer.start(self._animation_timeout)
else: