Ticket #1788: display_descriptions_and_mark_nodes.diff

File display_descriptions_and_mark_nodes.diff, 1.2 KB (added by bernd@…, 10 years ago)

Patch for 0.12

  • Map/TrackPoint.cpp

    a b  
    390390        if (speed())
    391391                D += "<i>"+QApplication::translate("MapFeature", "speed")+": </i>" + QString::number(speed(), 'f', 4) + "<br/>";
    392392
     393        if ((i = findKey("_description_")) < tagSize())
     394                D += "<i>"+QApplication::translate("MapFeature", "description")+": </i>" + tagValue(i) + "<br/>";
     395
    393396        if ((i = findKey("_waypoint_")) < tagSize()) {
    394397                D += "<p><b>"+QApplication::translate("MapFeature", "Waypoint")+"</b><br/>";
    395398
    396                 if ((i = findKey("_description_")) < tagSize())
    397                         D += "<i>"+QApplication::translate("MapFeature", "description")+": </i>" + tagValue(i) + "<br/>";
    398 
    399399                if ((i = findKey("_comment_")) < tagSize())
    400400                        D += "<i>"+QApplication::translate("MapFeature", "comment")+": </i>" + tagValue(i) + "<br/>";
    401401        }
  • PaintStyle/EditPaintStyle.cpp

    a b  
    223223                        {
    224224                                QPointF P(p->theProjection.project(Pt));
    225225
    226                                 if (Pt->findKey("_waypoint_") != Pt->tagSize()) {
     226                                if (Pt->findKey("_waypoint_") != Pt->tagSize() || Pt->findKey("_description_") < Pt->tagSize()) {
    227227                                        QRectF R(P-QPointF(4,4),QSize(8,8));
    228228                                        p->thePainter.fillRect(R,QColor(255,0,0,128));
    229229                                }