Layer::get(const IFeature::FId&) would return null pointer (feature not found)
if called with a FId of type IFeature::All, as it is e.g. from
ClearTagCommand::fromXML().  This had deleterious follow-on effects, such as
inability to upload changes after loading .mdc files containing un-uploaded
changes and a ClearTagCommand in the command-history.

Signed-off-by: David Favro <merkaar...@meta-dynamic.com>
---
 src/Layers/Layer.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/Layers/Layer.cpp b/src/Layers/Layer.cpp
index c1396cb..fcab2ba 100644
--- a/src/Layers/Layer.cpp
+++ b/src/Layers/Layer.cpp
@@ -408,7 +408,7 @@ Feature* Layer::get(const IFeature::FId& id)
 
     i = p->IdMap.find(id.numId);
     while (i != p->IdMap.end() && i.key() == id.numId) {
-        if (i.value()->id().type == id.type || id.type == 
IFeature::Uninitialized)
+       if ( (id.type == IFeature::Uninitialized) || ((i.value()->id().type & 
id.type) != 0) )
             return i.value();
         ++i;
     }
-- 
1.7.0.4


_______________________________________________
Merkaartor mailing list
Merkaartor@openstreetmap.org
http://lists.openstreetmap.org/listinfo/merkaartor

Reply via email to