Changeset 31922 in osm for applications/editors/josm/plugins
- Timestamp:
- 2016-01-03T15:03:35+01:00 (9 years ago)
- Location:
- applications/editors/josm/plugins/photoadjust
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/photoadjust/build.xml
r30964 r31922 5 5 <property name="commit.message" value="Commit message"/> 6 6 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 7 <property name="plugin.main.version" value=" 8029"/>7 <property name="plugin.main.version" value="9270"/> 8 8 9 9 <!-- Configure these properties (replace "..." accordingly). … … 51 51 sourcepath="${plugin.src.dir}" 52 52 windowtitle="${ant.project.name}" 53 linksource="true"> 54 <link href="../../../core/javadoc"/> 53 linksource="true" 54 private="true"> 55 <classpath> 56 <pathelement location="${josm}"/> 57 </classpath> 58 <!-- Paths are relative to javadoc destdir (${plugin.javadoc.dir}). --> 59 <link href="../../../core/javadoc/"/> 55 60 <link href="http://josm.openstreetmap.de/doc/"/> 56 <link href="http://docs.oracle.com/javase/7/docs/api "/>61 <link href="http://docs.oracle.com/javase/7/docs/api/"/> 57 62 </javadoc> 58 63 </target> -
applications/editors/josm/plugins/photoadjust/i18n/build-i18n.xml
r30884 r31922 44 44 <target name="lang" description="Prepare *.lang files in data directory."> 45 45 <exec executable="perl"> 46 <arg line="../../i18n/i18n.pl data${plugin.po.dir}/*.po"/>46 <arg line="../../i18n/i18n.pl --potfile=${plugin.po.dir}/${ant.project.name}.pot --basedir=data/ ${plugin.po.dir}/*.po"/> 47 47 </exec> 48 48 </target> -
applications/editors/josm/plugins/photoadjust/src/org/openstreetmap/josm/plugins/photoadjust/PhotoAdjustPlugin.java
r30962 r31922 36 36 super(info); 37 37 GeoImageLayer.registerMenuAddition(new UntaggedGeoImageLayerAction()); 38 //new PhotoPropertyEditor(); 38 39 worker = new PhotoAdjustWorker(); 39 40 initAdapters(); … … 51 52 layers.add(imageLayer); 52 53 worker.doMousePressed(evt, layers); 54 } 55 } 56 57 @Override 58 public void mouseReleased(MouseEvent evt) { 59 if (imageLayer != null) { 60 worker.doMouseReleased(evt); 53 61 } 54 62 } -
applications/editors/josm/plugins/photoadjust/src/org/openstreetmap/josm/plugins/photoadjust/PhotoAdjustWorker.java
r31413 r31922 23 23 // the photo is moved very far. 24 24 private Point2D dragOffset = null; 25 private boolean centerViewIsDisabled = false; 26 private boolean centerViewNeedsEnable = false; 25 27 26 28 /** … … 31 33 dragLayer = null; 32 34 dragOffset = null; 35 } 36 37 /** 38 * Disable the "center view" button. The map is moved instead of the 39 * photo if the center view is enabled while a photo is moved. The method 40 * disables the center view to avoid such behavior. Call 41 * restoreCenterView() to restore the original state. 42 */ 43 public void disableCenterView() { 44 if (!centerViewIsDisabled) { 45 centerViewIsDisabled = true; 46 centerViewNeedsEnable = ImageViewerDialog.setCentreEnabled(false); 47 } 48 } 49 50 /** 51 * Restore the center view state that was active before 52 * disableCenterView() was called. 53 */ 54 public void restoreCenterView() { 55 if (centerViewIsDisabled) { 56 if (centerViewNeedsEnable) { 57 centerViewNeedsEnable = false; 58 ImageViewerDialog.setCentreEnabled(true); 59 } 60 centerViewIsDisabled = false; 61 } 33 62 } 34 63 … … 94 123 dragLayer = layer; 95 124 setDragOffset(dragPhoto, evt); 125 disableCenterView(); 96 126 break; 97 127 } … … 100 130 } 101 131 } 132 } 133 134 /** 135 * Mouse release handler. 136 * 137 * @param evt Mouse event from MouseAdapter mouseReleased(). 138 */ 139 public void doMouseReleased(MouseEvent evt) { 140 restoreCenterView(); 102 141 } 103 142 … … 114 153 } 115 154 else { 155 disableCenterView(); 116 156 movePhoto(dragPhoto, dragLayer, evt); 117 157 }
Note:
See TracChangeset
for help on using the changeset viewer.