Changeset 3804 in josm


Ignore:
Timestamp:
2011-01-23T12:09:17+01:00 (14 years ago)
Author:
bastiK
Message:

paint primitives that are selected and member of a selected relation in selected color (red) and not in memberselected color (pink)

Location:
trunk/src/org/openstreetmap/josm
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapPaintVisitor.java

    r3803 r3804  
    523523
    524524    /* Shows areas before non-areas */
    525     public void visitAll(DataSet data, boolean virtual, Bounds bounds) {
     525    public void visitAll(final DataSet data, boolean virtual, Bounds bounds) {
    526526        BBox bbox = new BBox(bounds);
    527527        this.data = data;
     
    634634                                        ((AreaElemStyle)style).getLineStyle().paintPrimitive(osm, paintSettings, painter, true, true);
    635635                                    } else {
    636                                         style.paintPrimitive(osm, paintSettings, painter, true, true);
     636                                        style.paintPrimitive(osm, paintSettings, painter, data.isSelected(osm), true);
    637637                                    }
    638638                                }
     
    640640                                {
    641641                                    if(isZoomOk(style)) {
    642                                         style.paintPrimitive(osm, paintSettings, painter, true, true);
     642                                        style.paintPrimitive(osm, paintSettings, painter, data.isSelected(osm), true);
    643643                                    }
    644644                                }
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapPainter.java

    r3691 r3804  
    207207            g.setFont(defaultFont);
    208208        }
    209         if (selected)
     209        if (selected || member)
    210210        {
    211             g.setColor (  member ? relationSelectedColor : selectedColor );
    212             g.drawRect (p.x-w/2-2, p.y-h/2-2, w+4, h+4);
     211            g.setColor(selected? selectedColor : relationSelectedColor);
     212            g.drawRect(p.x-w/2-2, p.y-h/2-2, w+4, h+4);
    213213        }
    214214    }
  • trunk/src/org/openstreetmap/josm/gui/mappaint/LineElemStyle.java

    r3719 r3804  
    181181            markColor = paintSettings.getHighlightColor();
    182182        } else if (selected) {
    183             markColor = member ? paintSettings.getRelationSelectedColor() : paintSettings.getSelectedColor();
     183            markColor = paintSettings.getSelectedColor();
     184        } else if (member) {
     185            markColor = paintSettings.getRelationSelectedColor();
    184186        } else if(w.isDisabled()) {
    185187            markColor = paintSettings.getInactiveColor();
  • trunk/src/org/openstreetmap/josm/gui/mappaint/SimpleNodeElemStyle.java

    r3653 r3804  
    3838                color = settings.getInactiveColor();
    3939            } else if (selected) {
    40                 color = member ? settings.getRelationSelectedColor() : settings.getSelectedColor();
     40                color = settings.getSelectedColor();
     41            } else if (member) {
     42                color = settings.getRelationSelectedColor();
    4143            } else if (isConnection) {
    4244                if (n.isTagged()) {
Note: See TracChangeset for help on using the changeset viewer.