public ChangeItemOrder(Layer layer, List<Layer.LayerItem> itemsToMove, FrontOrBack whereToSend) { // init the layer mLayer = layer; mInsertPosition = (int)whereToSend; // init the index array mItemIndex = new List<int>(itemsToMove.Count); // copy the list, because the pointer may change (specially if it is the selection) // but we don't duplicate the texts themselves mItems = new List<Layer.LayerItem>(itemsToMove.Count); foreach (Layer.LayerItem item in itemsToMove) mItems.Add(item); }
public ChangeItemOrder(Layer layer, List <Layer.LayerItem> itemsToMove, FrontOrBack whereToSend) { // init the layer mLayer = layer; mInsertPosition = (int)whereToSend; // init the index array mItemIndex = new List <int>(itemsToMove.Count); // copy the list, because the pointer may change (specially if it is the selection) // but we don't duplicate the texts themselves mItems = new List <Layer.LayerItem>(itemsToMove.Count); foreach (Layer.LayerItem item in itemsToMove) { mItems.Add(item); } }