Selection selection = blackboard.getSelection();
undoData = new ArrayList<Bag>();
EditState oldState = handler.getCurrentState();
try {
handler.setCurrentState(EditState.BUSY);
DeleteVertexAnimation deleteVertexAnimation=null;
if( runAnimation ){
for( Point point : selection ) {
deleteVertexAnimation = new DeleteVertexAnimation(point);
AnimationUpdater.runTimer(handler.getContext().getMapDisplay(), deleteVertexAnimation);
}
if( deleteVertexAnimation!=null ){
final DeleteVertexAnimation finalDeleteVertexAnim=deleteVertexAnimation;
PlatformGIS.wait(deleteVertexAnimation.getFrameInterval(), 5000, new WaitCondition(){
public boolean isTrue() {
return !finalDeleteVertexAnim.isValid();
}
}, null);
}
}