Skip to content
Permalink
Browse files
Fix for dateline labeling problems
git-svn-id: http://svn.osgeo.org/qgis/trunk@14352 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Oct 7, 2010
1 parent 0acfaaf commit aefd4e0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
@@ -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 aefd4e0

Please sign in to comment.