Changeset 27977 in osm for applications/editors


Ignore:
Timestamp:
2012-03-03T12:38:28+01:00 (13 years ago)
Author:
jttt
Message:

Select zoom tool in case select tool is not available (ie activate layer is not osm data layer)

Location:
applications/editors/josm/plugins/editgpx
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/editgpx/build.xml

    r27038 r27977  
    2222** and run
    2323**    > ant  publish
    24 ** 
     24**
    2525**
    2626-->
    2727<project name="editgpx" default="dist" basedir=".">
    2828    <property name="commit.message" value="Changed constructor signature of plugin main class"/>
    29     <property name="plugin.main.version" value="4549"/>
     29    <property name="plugin.main.version" value="5035"/>
    3030    <property name="josm" location="../../core/dist/josm-custom.jar"/>
    3131    <property name="plugin.dist.dir" value="../../dist"/>
  • applications/editors/josm/plugins/editgpx/josm-editgpx.launch

    r19683 r27977  
    99<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JDK 6"/>
    1010<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.openstreetmap.josm.gui.MainApplication"/>
    11 <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="editgpx"/>
     11<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="editgpx_svn"/>
    1212</launchConfiguration>
  • applications/editors/josm/plugins/editgpx/src/org/openstreetmap/josm/plugins/editgpx/EditGpxLayer.java

    r23650 r27977  
    145145            super(tr("Convert to GPX layer"), ImageProvider.get("converttogpx"));
    146146        }
     147        @Override
    147148        public void actionPerformed(ActionEvent e) {
     149            if (Main.map.mapMode instanceof EditGpxMode) {
     150                if (!Main.map.selectSelectTool(false)) {
     151                    Main.map.selectZoomTool(false); // Select tool might not be support of active layer, zoom is always supported
     152                }
     153            }
    148154            Main.main.addLayer(new GpxLayer(toGpxData(false), tr("Converted from: {0}", getName())));
    149155            Main.main.removeLayer(EditGpxLayer.this);
    150             if(Main.map.mapMode instanceof EditGpxMode)
    151                 Main.map.selectSelectTool(false);
    152156        }
    153157    }
     
    158162            super(tr("Convert to GPX layer with anonymised time"), ImageProvider.get("converttogpx"));
    159163        }
     164        @Override
    160165        public void actionPerformed(ActionEvent e) {
     166            if (Main.map.mapMode instanceof EditGpxMode) {
     167                if (!Main.map.selectSelectTool(false)) {
     168                    Main.map.selectZoomTool(false); // Select tool might not be support of active layer, zoom is always supported
     169                }
     170            }
    161171            Main.main.addLayer(new GpxLayer(toGpxData(true), tr("Converted from: {0}", getName())));
    162172            Main.main.removeLayer(EditGpxLayer.this);
    163             if(Main.map.mapMode instanceof EditGpxMode)
    164                 Main.map.selectSelectTool(false);
    165173        }
    166174    }
Note: See TracChangeset for help on using the changeset viewer.