コード例 #1
0
ファイル: AddRuler.cs プロジェクト: Shevonar/BlueBrick
 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);
 }
コード例 #2
0
ファイル: DuplicateRuler.cs プロジェクト: Shevonar/BlueBrick
 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]);
     }
 }