Exemple #1
0
 public override void redo()
 {
     // and add this ruler in the list of the layer
     mRulerLayer.addRulerItem(mRulerItem, mRulerItemIndex);
     // change the selection to the new added text (should be done after the add)
     mRulerLayer.clearSelection();
     mRulerLayer.addObjectInSelection(mRulerItem);
 }
Exemple #2
0
 public override void undo()
 {
     // and add all the texts in the reverse order
     for (int i = mRulers.Count - 1; i >= 0; --i)
     {
         mRulerLayer.addRulerItem(mRulers[i] as LayerRuler.RulerItem, mRulerIndex[i]);
     }
 }
Exemple #3
0
 public override void redo()
 {
     // clear the selection first, because we want to select only all the added rulers
     mRulerLayer.clearSelection();
     // add all the rulers (by default all the rulers 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 rulers 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)
     {
         mRulerLayer.addRulerItem(mItems[i] as LayerRuler.RulerItem, mItemIndex[i]);
         mRulerLayer.addObjectInSelection(mItems[i]);
     }
 }