Skip to content

Commit

Permalink
Fix for dateline labeling problems
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14352 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Oct 7, 2010
1 parent 13870fa commit ae31743
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/core/pal/layer.cpp
Expand Up @@ -236,7 +236,9 @@ namespace pal
if ( hashtable->find( geom_id ) )
{
modMutex->unlock();
throw new PalException::FeatureExists();
//A feature with this id already exists. Don't throw an exception as sometimes,
//the same feature is added twice (dateline split with otf-reprojection)
return false;
}

// Split MULTI GEOM and Collection in simple geometries
Expand Down
6 changes: 3 additions & 3 deletions src/core/pal/pal.cpp
Expand Up @@ -167,8 +167,6 @@ namespace pal

Layer * Pal::addLayer( const char *lyrName, double min_scale, double max_scale, Arrangement arrangement, Units label_unit, double defaultPriority, bool obstacle, bool active, bool toLabel )
{


Layer *lyr;
lyrsMutex->lock();

Expand All @@ -183,7 +181,9 @@ namespace pal
if ( strcmp(( *it )->name, lyrName ) == 0 ) // if layer already known
{
lyrsMutex->unlock();
throw new PalException::LayerExists();
//There is already a layer with this name, so we just return the existing one.
//Sometimes the same layer is added twice (e.g. datetime split with otf-reprojection)
return *it;
}
}

Expand Down

0 comments on commit ae31743

Please sign in to comment.