Skip to content

VesselLabel.EnableAllLabels actually disables all labels #367

@Clayell

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();
		}
	}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions