Skip to content
Permalink
Browse files
Fix for dateline labeling problems
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 ae31743ebea3fee77dcf8a2c4b04dd49c6186f01
Showing with 6 additions and 4 deletions.
  1. +3 −1 src/core/pal/layer.cpp
  2. +3 −3 src/core/pal/pal.cpp
@@ -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
@@ -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();

@@ -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;
}
}

0 comments on commit ae31743

Please sign in to comment.