Changeset 27296 in osm for applications/editors/josm


Ignore:
Timestamp:
2011-12-21T18:26:19+01:00 (13 years ago)
Author:
larry0ua
Message:

'PicLayer - fix of #7171'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/PicLayerPlugin.java

    r27290 r27296  
    3434
    3535import org.openstreetmap.josm.Main;
     36import org.openstreetmap.josm.actions.mapmode.MapMode;
    3637import org.openstreetmap.josm.gui.IconToggleButton;
    3738import org.openstreetmap.josm.gui.MapFrame;
     
    105106
    106107            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));
     108            buttonList.add(picLayerActionButtonFactory(movePictureAction));
     109            buttonList.add(picLayerActionButtonFactory(movePointAction));
     110            buttonList.add(picLayerActionButtonFactory(transformPointAction));
     111            buttonList.add(picLayerActionButtonFactory(rotatePictureAction));
     112            buttonList.add(picLayerActionButtonFactory(scaleXYPictureAction));
     113            buttonList.add(picLayerActionButtonFactory(scaleXPictureAction));
     114            buttonList.add(picLayerActionButtonFactory(scaleYPictureAction));
     115            buttonList.add(picLayerActionButtonFactory(shearPictureAction));
    115116
    116117            for(IconToggleButton btn : buttonList) {
     
    118119            }
    119120        }
     121    }
     122   
     123    private IconToggleButton picLayerActionButtonFactory(MapMode action) {
     124        IconToggleButton button = new IconToggleButton(action);
     125        button.setAutoHideDisabledButton(true);
     126        return button;
    120127    }
    121128
Note: See TracChangeset for help on using the changeset viewer.