close issue#5158:Label's display may go bonkers if using outline feature.
Merge pull request #7008 from visiblelight/ProgramState

Fix issue 5393
[ci skip]
Merge pull request #7004 from Dhilan007/v3-labelfix

close issue#5158:Label's display may go bonkers if using outline feature.