Changeset 27290 in osm for applications/editors
- Timestamp:
- 2011-12-21T15:35:00+01:00 (13 years ago)
- Location:
- applications/editors/josm/plugins/piclayer
- Files:
-
- 1 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/piclayer/build.xml
r27231 r27290 22 22 --> 23 23 <project name="PicLayer" default="dist" basedir="."> 24 <property name="commit.message" value="PicLayer - changed marker icon to make it more visible; #5451; #7124 - first stage"/>25 <property name="plugin.main.version" value="4 549"/>24 <property name="commit.message" value="PicLayer - fix of #7171"/> 25 <property name="plugin.main.version" value="4669"/> 26 26 <!-- 27 27 ************************************************ -
applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/PicLayerPlugin.java
r27191 r27290 59 59 public class PicLayerPlugin extends Plugin implements LayerChangeListener { 60 60 61 public static List< PicToggleButton> buttonList = null;61 public static List<IconToggleButton> buttonList = null; 62 62 63 63 // Plugin menu … … 104 104 // Create plugin buttons and add them to the toolbar 105 105 106 buttonList = new ArrayList< PicToggleButton>(7);107 buttonList.add(new PicToggleButton(movePictureAction, tr("Move Picture"), "piclayer.actionvisibility.move", true));108 buttonList.add(new PicToggleButton(movePointAction, tr("Move Point"), "piclayer.actionvisibility.movepoint", true));109 buttonList.add(new PicToggleButton(transformPointAction, tr("Transform Point"), "piclayer.actionvisibility.transformpoint", true));110 buttonList.add(new PicToggleButton(rotatePictureAction, tr("Rotate"), "piclayer.actionvisibility.rotate", false));111 buttonList.add(new PicToggleButton(scaleXYPictureAction, tr("Scale"), "piclayer.actionvisibility.scale", false));112 buttonList.add(new PicToggleButton(scaleXPictureAction, tr("Scale X"), "piclayer.actionvisibility.scalex", false));113 buttonList.add(new PicToggleButton(scaleYPictureAction, tr("Scale Y"), "piclayer.actionvisibility.scaley", false));114 buttonList.add(new PicToggleButton(shearPictureAction, tr("Shear"), "piclayer.actionvisibility.shear", false));106 buttonList = new ArrayList<IconToggleButton>(7); 107 buttonList.add(new IconToggleButton(movePictureAction)); 108 buttonList.add(new IconToggleButton(movePointAction)); 109 buttonList.add(new IconToggleButton(transformPointAction)); 110 buttonList.add(new IconToggleButton(rotatePictureAction)); 111 buttonList.add(new IconToggleButton(scaleXYPictureAction)); 112 buttonList.add(new IconToggleButton(scaleXPictureAction)); 113 buttonList.add(new IconToggleButton(scaleYPictureAction)); 114 buttonList.add(new IconToggleButton(shearPictureAction)); 115 115 116 116 for(IconToggleButton btn : buttonList) { … … 128 128 boolean newPic = newLayer instanceof PicLayerAbstract; 129 129 // actually that should be not enough - JOSM should hide all buttons that are disabled for current layer! 130 if (oldPic && !newPic || oldLayer == null && !newPic) { // leave picture layer - hide all controls 131 for (PicToggleButton btn : buttonList) { 132 btn.writeVisible(); 133 btn.setVisible(false); 134 } 135 if (oldLayer != null) 136 ((PicLayerAbstract)oldLayer).setDrawPoints(false); 130 if (oldPic) { // leave picture layer if (oldLayer != null) 131 ((PicLayerAbstract)oldLayer).setDrawPoints(false); 137 132 } 138 if (!oldPic && newPic) { // enter picture layer - reset visibility of controls 139 for (PicToggleButton btn : buttonList) 140 btn.readVisible(); 133 if (newPic) { 134 ((PicLayerAbstract)newLayer).setDrawPoints(true); 141 135 } 142 136 }
Note:
See TracChangeset
for help on using the changeset viewer.