Skip to content

VesselLabel.EnableAllLabels actually disables all labels #367

Description

@Clayell

Provide a description of the KSP bug or improvement

Came across this by chance in the ksp codebase, unsure if it actually breaks things ingame.

VesselLabel.EnableAllLabels() happens to have the exact same logic as VesselLabel.DisableAllLabels(), which perhaps seems to be a typo on behalf of squad. An Enable() method for BaseLabel does exist.

Image
private void DisableAllLabels()
{
	int i = 0;
	for (int count = labels.Count; i < count; i++)
	{
		BaseLabel baseLabel = labels[i];
		if (baseLabel != null)
		{
			baseLabel.Disable();
		}
	}
}

private void EnableAllLabels()
{
	int i = 0;
	for (int count = labels.Count; i < count; i++)
	{
		BaseLabel baseLabel = labels[i];
		if (baseLabel != null)
		{
			baseLabel.Disable();
		}
	}
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions