Commit fdb7be68 authored by lm's avatar lm

Added safety checks for map clicks

parent ac98c532
...@@ -378,16 +378,22 @@ void MapWidget::captureGeometryDrag(Geometry* geom, QPointF coordinate){ ...@@ -378,16 +378,22 @@ void MapWidget::captureGeometryDrag(Geometry* geom, QPointF coordinate){
int temp = 0; int temp = 0;
Point* point2Find; Point* point2Find;
point2Find = wpIndex[geom->name()]; point2Find = wpIndex[geom->name()];
if (point2Find)
{
point2Find->setCoordinate(coordinate); point2Find->setCoordinate(coordinate);
point2Find = dynamic_cast <Point*> (geom); point2Find = dynamic_cast <Point*> (geom);
if (point2Find)
{
point2Find->setCoordinate(coordinate); point2Find->setCoordinate(coordinate);
// qDebug() << geom->name(); // qDebug() << geom->name();
temp = geom->get_myIndex(); temp = geom->get_myIndex();
//qDebug() << temp; //qDebug() << temp;
emit sendGeometryEndDrag(coordinate,temp); emit sendGeometryEndDrag(coordinate,temp);
}
}
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment