public void UpdateEntityLabels()
        {
            Editor editor = ActiveDocument;
            Level  level  = ActiveLevel;

            Entity e = level.GetSelectedEntity();

            if (e != null)
            {
                label_entity_type_value.Text = e.Type.ToString();
                label_entity_guid_value.Text = e.num + ": " + e.guid.ToPrettyString();

                // Update the complex labels, if necessary
                if (e.guid != editor.m_entity_prev_guid)
                {
                    ClearEntityLinkLabels();
                    prop_grid_entity.SelectedObject = e.GetEntityProps();
                    AddEntityLinkLabels(e);

                    comboBox_entity_subtype.Items.Clear();
                    foreach (string s in e.SubTypeNames())
                    {
                        if (s != "NUM")
                        {
                            comboBox_entity_subtype.Items.Add(Editor.CleanupName(s));
                        }
                    }
                    m_ignore_combobox_entity_sub_type_changed = true;
                    comboBox_entity_subtype.SelectedItem      = Editor.CleanupName(e.SubTypeName());
                    m_ignore_combobox_entity_sub_type_changed = false;

                    comboBox_entity_subtype.Enabled = true;

                    editor.m_entity_prev_guid = e.guid;
                }
            }
            else
            {
                label_entity_type_value.Text = "";
                label_entity_guid_value.Text = "";

                // Update the complex labels, if necessary
                if (editor.m_entity_prev_guid != Guid.Empty)
                {
                    prop_grid_entity.SelectedObject = null;
                    ClearEntityLinkLabels();

                    m_ignore_combobox_entity_sub_type_changed = true;
                    comboBox_entity_subtype.SelectedItem      = null;
                    m_ignore_combobox_entity_sub_type_changed = false;
                    comboBox_entity_subtype.Enabled           = false;

                    editor.m_entity_prev_guid = Guid.Empty;
                }
            }

            //Enable/disable place entity buttons based on selected segment/side, with special considerations for doors
            button_place_entity_segment.Enabled = ((level.selected_segment > -1) && (comboBox_entity_type.SelectedIndex != (int)EntityType.DOOR));
            button_place_entity_side.Enabled    = ((level.selected_segment > -1) && (level.selected_side > -1) && (level.GetSelectedSide().Door == -1));

            //Enable/disable buttons that depend on selected entity
            label_entity_type.Enabled                       = label_entity_type_value.Enabled = label_entity_guid.Enabled = label_entity_guid_value.Enabled =
                comboBox_entity_subtype.Enabled             =
                    button_entity_reset_rotation.Enabled    = button_entity_face_selected_side.Enabled =
                        button_entity_align_side.Enabled    = button_entity_move.Enabled =
                            button_entity_mark_type.Enabled = button_entity_mark_subtype.Enabled = (e != null);

            //Enable move to segment if there's a selected segment, a selected entity, and the entity isn't a door
            button_entity_move_segment.Enabled = ((level.selected_segment > -1) && (e != null) && (e.Type != EntityType.DOOR));

            //Enable move to side if there's a selected segment, a selected side, a selected entity and, if the entity is a door, there's not already a door in the side (unless the door is this door, in which case we allow move to side for alignment)
            button_entity_move_side.Enabled = ((level.selected_segment > -1) && (level.selected_side > -1) && (e != null) && (((level.GetSelectedSide().Door == -1) || (e.Type != EntityType.DOOR)) || (level.GetSelectedSide().Door == level.GetSelectedEntity().num)));

            //Enable/diable buttons that depend on marked
            List <Entity> marked_entities = level.GetMarkedEntities();

            button_entity_marked_reset_rotation.Enabled = button_entity_marked_face_selected_side.Enabled = button_entity_duplicate.Enabled = (marked_entities.Count > 0);

            //Enable/disable buttons that depend on selected AND marked
            bool enabled = false;

            if (e != null)                              //We have a selected entity; see if there are any marked of the same type
            {
                foreach (Entity entity in level.GetMarkedEntities())
                {
                    if ((entity != e) && (entity.Type == e.Type))
                    {
                        enabled = true;
                        break;
                    }
                }
            }
            button_entity_copy_to_marked.Enabled = button_entity_copy_subtype.Enabled = enabled;

            if (e != null)
            {
                string team = "ALL";
                if (e.m_multiplayer_team_association_mask == 1)
                {
                    team = "A";
                }
                else if (e.m_multiplayer_team_association_mask == 2)
                {
                    team = "B";
                }
                label_team.Text = "MP Team: " + team;
            }
            else
            {
                label_team.Text = "MP Team: -";
            }
        }