Ignore:
Timestamp:
2017-03-13T17:04:29+01:00 (7 years ago)
Author:
michael2402
Message:

Do not include text label in area style - use a separate class and start merging code for on-line and in-area drawing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/AreaElement.java

    r11720 r11722  
    1010import org.openstreetmap.josm.data.osm.Way;
    1111import org.openstreetmap.josm.data.osm.visitor.paint.MapPaintSettings;
    12 import org.openstreetmap.josm.data.osm.visitor.paint.PaintColors;
    1312import org.openstreetmap.josm.data.osm.visitor.paint.StyledMapRenderer;
    1413import org.openstreetmap.josm.data.preferences.IntegerProperty;
    1514import org.openstreetmap.josm.gui.mappaint.Cascade;
    1615import org.openstreetmap.josm.gui.mappaint.Environment;
    17 import org.openstreetmap.josm.gui.mappaint.Keyword;
    1816import org.openstreetmap.josm.gui.mappaint.MapPaintStyles.IconReference;
    1917import org.openstreetmap.josm.gui.util.RotationAngle;
     
    120118        }
    121119
    122         TextLabel text = null;
    123         Keyword textPos = c.get(TEXT_POSITION, null, Keyword.class);
    124         if (textPos == null || "center".equals(textPos.val)) {
    125             text = TextLabel.create(env, PaintColors.AREA_TEXT.get(), true);
    126         }
     120        TextLabel text = null; // <- text is handled by TextElement
    127121        MapImage iconImage = NodeElement.createIcon(env);
    128122        RotationAngle rotationAngle = NodeElement.createRotationAngle(env);
    129123
    130         if (iconImage != null || text != null) {
     124        if (iconImage != null) {
    131125            // fake a transparent color.
    132126            color = new Color(0, 0, 0, 0);
Note: See TracChangeset for help on using the changeset viewer.