Changeset 32078 in osm
- Timestamp:
- 2016-02-19T23:36:27+01:00 (9 years ago)
- Location:
- applications/editors/josm/plugins/mapillary
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/mapillary/.settings/org.eclipse.jdt.core.prefs
r31971 r32078 73 73 org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning 74 74 org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore 75 org.eclipse.jdt.core.compiler.problem.unhandledWarningToken= warning75 org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=ignore 76 76 org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning 77 77 org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning -
applications/editors/josm/plugins/mapillary/build.gradle
r32070 r32078 141 141 142 142 task activatePlugin(type: Copy) { 143 from "gradle/josm-preferences.xml" 144 into "$buildDir/.josm" 145 rename 'josm-preferences.xml', 'preferences.xml' 143 if (!new File("$buildDir/.josm/preferences.xml").exists()) { 144 from "gradle/josm-preferences.xml" 145 into "$buildDir/.josm" 146 rename 'josm-preferences.xml', 'preferences.xml' 147 } 146 148 } 147 149 -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryAbstractImage.java
r32064 r32078 17 17 * 18 18 */ 19 public class MapillaryAbstractImage implements Comparable<MapillaryAbstractImage> {19 public class MapillaryAbstractImage implements Comparable<MapillaryAbstractImage> { 20 20 /** 21 21 * If two values for field ca differ by less than EPSILON both values are considered equal. -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryLayer.java
r32064 r32078 318 318 } 319 319 // Draw sequence line 320 g.setColor(Color.WHITE); 321 g.setStroke(new BasicStroke(this == Main.map.mapView.getActiveLayer() ? 3 : 1)); 320 final MapillaryAbstractImage selectedImage = MapillaryLayer.getInstance().getData().getSelectedImage(); 321 String selectedImageKey = null; // Intentionally not null to avoid null-check before .equals() 322 if (selectedImage != null && selectedImage.getSequence() != null) { 323 selectedImageKey = selectedImage.getSequence().getKey(); 324 } 325 g.setStroke(new BasicStroke(this == Main.map.mapView.getActiveLayer() ? 3 : 2)); 322 326 for (MapillarySequence seq : getData().getSequences()) { 327 if (selectedImageKey != null && selectedImageKey.equals(seq.getKey())) { 328 g.setColor(Color.MAGENTA.brighter()); 329 } else { 330 g.setColor(Color.WHITE); 331 } 323 332 g.draw(MapViewGeometryUtil.getSequencePath(mv, seq)); 324 333 } -
applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryPreferenceSettingTest.java
r31909 r32078 47 47 assertEquals(I18n.tr("You are currently not logged in."), ((JLabel) getPrivateField(setting, "loginLabel")).getText()); 48 48 assertFalse(((JPanel) getPrivateField(setting, "loginPanel")).isAncestorOf(((JButton) getPrivateField(setting, "logoutButton")))); 49 assertTrue(((JPanel) getPrivateField(setting, "loginPanel")).isAncestorOf(((JButton) getPrivateField(setting, "loginButton")))); 49 50 50 51 String username = "TheMapillaryUsername"; 51 52 setting.onLogin(username); 52 53 53 assertEquals(I18n.tr(" Re-Login"), ((JButton) getPrivateField(setting, "loginButton")).getText());54 assertEquals(I18n.tr("Login"), ((JButton) getPrivateField(setting, "loginButton")).getText()); 54 55 assertEquals(I18n.tr("You are logged in as ''{0}''.", username), ((JLabel) getPrivateField(setting, "loginLabel")).getText()); 55 56 assertTrue(((JPanel) getPrivateField(setting, "loginPanel")).isAncestorOf(((JButton) getPrivateField(setting, "logoutButton")))); 57 assertFalse(((JPanel) getPrivateField(setting, "loginPanel")).isAncestorOf(((JButton) getPrivateField(setting, "loginButton")))); 56 58 } 57 59
Note:
See TracChangeset
for help on using the changeset viewer.