Пример #1
0
 public override void redo()
 {
     // and add this text in the list of the layer
     mTextLayer.addTextCell(mTextCell, mTextCellIndex);
     // change the selection to the new added text (should be done after the add)
     mTextLayer.clearSelection();
     mTextLayer.addObjectInSelection(mTextCell);
 }
Пример #2
0
 public override void redo()
 {
     // clear the selection first, because we want to select only all the added texts
     mTextLayer.clearSelection();
     // add all the texts (by default all the text index are initialized with -1
     // so the first time they are added, we just add them at the end,
     // after the index is record in the array during the undo)
     // We must add all the texts in the reverse order to avoid crash (insert with an index greater than the size of the list)
     for (int i = mItems.Count - 1; i >= 0; --i)
     {
         mTextLayer.addTextCell(mItems[i] as LayerText.TextCell, mItemIndex[i]);
         mTextLayer.addObjectInSelection(mItems[i]);
     }
 }