Selection selection = editBlackboard.getSelection();
List<UndoableMapCommand> commands=new ArrayList<UndoableMapCommand>();
if( e.isShiftDown() ){
if( geoms!=null && geoms.contains(handler.getCurrentGeom())
&& !editBlackboard.getSelection().contains(point) ){
commands.add( new SelectVertexCommand(editBlackboard, point, Type.ADD ) );
}
} else if (e.isControlDown()) {
if (geoms != null && geoms.contains(handler.getCurrentGeom())) {
if( selection.contains(point) )
commands.add( new SelectVertexCommand(editBlackboard, point, Type.REMOVE) );
else{
commands.add( new SelectVertexCommand(editBlackboard, point, Type.ADD) );
}
}
}else{
if( selection.size()!=1 || !selection.contains(point) )
commands.add( new SelectVertexCommand(editBlackboard, point, Type.SET) );
}
if( geoms!=null && geoms.contains(handler.getCurrentGeom()) ){
if( handler.getCurrentState()==EditState.NONE){
commands.add( new SetEditStateCommand( handler, EditState.MODIFYING ) );
}