FullInspector.Rotorz.ReorderableList.ReorderableListControl.DuplicateItem C# (CSharp) Method

DuplicateItem() protected method

Duplicate specified item and raises the event .
protected DuplicateItem ( IReorderableListAdaptor adaptor, int itemIndex ) : void
adaptor IReorderableListAdaptor Reorderable list adaptor.
itemIndex int Zero-based index of item.
return void
        protected void DuplicateItem(IReorderableListAdaptor adaptor, int itemIndex)
        {
            adaptor.Duplicate(itemIndex);
            AutoFocusItem(s_ContextControlID, itemIndex + 1);

            GUI.changed = true;
            ReorderableListGUI.indexOfChangedItem = -1;

            var args = new ItemInsertedEventArgs(adaptor, itemIndex + 1, true);
            OnItemInserted(args);
        }