Changeset 6247 for geovis/trunk


Ignore:
Timestamp:
Apr 5, 2016 1:23:12 PM (8 years ago)
Author:
ldelgass
Message:

use flag instead of ifdef

File:
1 edited

Legend:

Unmodified
Added
Removed
  • geovis/trunk/Renderer.cpp

    r6246 r6247  
    15961596void Renderer::selectFeatures(std::vector<unsigned long>& featureIDs, const char *layerName, bool clear)
    15971597{
     1598    bool doPlacard = true;
    15981599    TRACE("Select layer '%s', num features: %u", layerName, featureIDs.size());
    15991600    if (clear) {
     
    16371638#if OSGEARTH_MIN_VERSION_REQUIRED(3, 0, 0)
    16381639            osgEarth::ObjectID id = index->getObjectID(fid);
    1639 #if 0
    1640             osgEarth::Features::Feature *feature = index->getFeature(id);
    1641             if (feature) {
    1642                 // Find feature centroid
    1643                 osgEarth::GeoPoint location;
    1644                 if (feature->getGeometry()) {
    1645                     osg::BoundingSphered bound;
    1646                     feature->getWorldBound(getMapSRS(), bound);
    1647                     location.set(getMapSRS(), bound.center(),
    1648                                  osgEarth::ALTMODE_ABSOLUTE);
     1640            if (doPlacard) {
     1641                osgEarth::Features::Feature *feature = index->getFeature(id);
     1642                if (feature) {
     1643                    // Find feature centroid
     1644                    osgEarth::GeoPoint location;
     1645                    if (feature->getGeometry()) {
     1646                        osg::BoundingSphered bound;
     1647                        feature->getWorldBound(getMapSRS(), bound);
     1648                        location.set(getMapSRS(), bound.center(),
     1649                                     osgEarth::ALTMODE_ABSOLUTE);
     1650                    }
     1651                    addPlacard(location, feature, layerName);
    16491652                }
    1650                 addPlacard(location, feature, layerName);
    16511653            }
    1652 #endif
    16531654            setHighlightByObjectID(id);
    16541655            TRACE("FID %lu = OID %d", fid, id);
Note: See TracChangeset for help on using the changeset viewer.