Function Polygon : double clicking to end a polygon input leads to erase two vertices when the last vertex has been input by coordinates.