Fixed tabs and widgets on them from painting when they are hidden