Fix selection tool button activation issues when changed via code