QTfrontend/drawmapscene.cpp
changeset 4657 3cd5bd943b94
parent 4560 5d6c7f88db73
child 4658 280195b0ffbd
equal deleted inserted replaced
4656:59e75518fb82 4657:3cd5bd943b94
   122         qint16 py = qFromBigEndian(*(qint16 *)data.data());
   122         qint16 py = qFromBigEndian(*(qint16 *)data.data());
   123         data.remove(0, 2);
   123         data.remove(0, 2);
   124         quint8 flags = *(quint8 *)data.data();
   124         quint8 flags = *(quint8 *)data.data();
   125         data.remove(0, 1);
   125         data.remove(0, 1);
   126 
   126 
       
   127 	if (data.size() < 5) points.append(QPoint(px, py));
   127         //last chunk or first point
   128         //last chunk or first point
   128         if((data.size() < 5) || (flags & 0x80))
   129         if((data.size() < 5) || (flags & 0x80))
   129         {
   130         {
   130             if(points.size())
   131             if(points.size())
   131             {
   132             {
   132                 addPath(pointsToPath(points), m_pen);
   133                 addPath(pointsToPath(points), m_pen);
   133                 paths.prepend(points);
   134                 paths.append(points);
   134 
   135 
   135                 points.clear();
   136                 points.clear();
   136             }
   137             }
   137         }
   138         }
   138 
   139 	if (data.size() > 5) points.append(QPoint(px, py));
   139         points.append(QPoint(px, py));
       
   140     }
   140     }
   141 
   141 
   142     emit pathChanged();
   142     emit pathChanged();
   143 }
   143 }
   144 
   144