Changeset 2853 in osm for applications/editors


Ignore:
Timestamp:
2007-05-09T23:39:04+02:00 (18 years ago)
Author:
damians
Message:

ls.incomplete fixed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/mappaint/src/mappaint/MapPaintVisitor.java

    r2808 r2853  
    2020import org.openstreetmap.josm.data.osm.OsmPrimitive;
    2121import org.openstreetmap.josm.data.osm.visitor.SimplePaintVisitor;
     22
     23import java.awt.event.MouseEvent;
     24
    2225
    2326/**
     
    181184                if (ls.shown) return;
    182185                ls.shown=true;
     186                if (ls.incomplete)
     187                        return;
    183188                Point p1 = nc.getPoint(ls.from.eastNorth);
    184189                Point p2 = nc.getPoint(ls.to.eastNorth);
     190
    185191                // checking if this segment is visible
    186192                if ((p1.x < 0) && (p2.x < 0)) return ;
     
    189195                if ((p1.y > nc.getHeight()) && (p2.y > nc.getHeight())) return ;
    190196                Graphics2D g2d = (Graphics2D)g;
    191                 if (ls.incomplete)
    192                         return;
    193197                if (ls.selected)
    194198                        col = getPreferencesColor("selected", Color.YELLOW);
     
    204208                if (showDirection) {
    205209                        double t = Math.atan2(p2.y-p1.y, p2.x-p1.x) + Math.PI;
    206             g.drawLine(p2.x,p2.y, (int)(p2.x + 10*Math.cos(t-PHI)), (int)(p2.y + 10*Math.sin(t-PHI)));
    207             g.drawLine(p2.x,p2.y, (int)(p2.x + 10*Math.cos(t+PHI)), (int)(p2.y + 10*Math.sin(t+PHI)));
     210                        g.drawLine(p2.x,p2.y, (int)(p2.x + 10*Math.cos(t-PHI)), (int)(p2.y + 10*Math.sin(t-PHI)));
     211                        g.drawLine(p2.x,p2.y, (int)(p2.x + 10*Math.cos(t+PHI)), (int)(p2.y + 10*Math.sin(t+PHI)));
    208212                }
    209213                g2d.setStroke(new BasicStroke(1));
     
    247251                        if (!osm.deleted)
    248252                                osm.visit(this);
    249 
     253               
    250254                for (final OsmPrimitive osm : data.nodes)
    251255                        if (!osm.deleted)
     
    259263        }
    260264}
     265
Note: See TracChangeset for help on using the changeset viewer.