void DeleteTag(EditedTag _tag, bool _selectPrevious) { if (_tag == null) { return; } if (_tag.m_next == null) { throw new Exception("Can't delete end tag!"); } m_internalChange++; // Link over tag if (m_selectedTag == _tag) { // SelectTag( _tag.m_previous != null ? _tag.m_previous : _tag.m_next ); m_selectedTag = _selectPrevious ? (_tag.m_previous != null ? _tag.m_previous : _tag.m_next) : (_tag.m_next != null ? _tag.m_next : _tag.m_previous); } _tag.Remove(); m_internalChange--; Invalidate(); UpdateSuggestionForm(); }