kopia lustrzana https://github.com/JOSM/MapWithAI
Add a pref to allow toggling the MapWithAI remote control (dependent upon #18283)
Signed-off-by: Taylor Smock <taylor.smock@kaart.com>pull/1/head
rodzic
14f2cf3559
commit
43e3e21c67
|
@ -83,6 +83,7 @@ public final class MapWithAIPlugin extends Plugin implements Destroyable {
|
|||
|
||||
setVersionInfo(info.localversion);
|
||||
RequestProcessor.addRequestHandlerClass("mapwithai", MapWithAIRemoteControl.class);
|
||||
new MapWithAIRemoteControl(); // instantiate to get action into Remote Control Preferences
|
||||
destroyables = new ArrayList<>();
|
||||
destroyables.add(new MapWithAIUploadHook(info));
|
||||
mapFrameInitialized(null, MainApplication.getMap());
|
||||
|
|
|
@ -16,6 +16,9 @@ import org.openstreetmap.josm.plugins.mapwithai.MapWithAIPlugin;
|
|||
|
||||
public class MapWithAIRemoteControl extends RequestHandler.RawURLParseRequestHandler {
|
||||
|
||||
private static final PermissionPrefWithDefault PERMISSION_PREF_WITH_DEFAULT = new PermissionPrefWithDefault(
|
||||
MapWithAIPlugin.NAME.concat(".remote_control"), true, tr("MapWithAI"));
|
||||
|
||||
private BBox download = null;
|
||||
private BBox crop = null;
|
||||
private Integer maxObj = null;
|
||||
|
@ -134,7 +137,7 @@ public class MapWithAIRemoteControl extends RequestHandler.RawURLParseRequestHan
|
|||
|
||||
@Override
|
||||
public PermissionPrefWithDefault getPermissionPref() {
|
||||
return null;
|
||||
return PERMISSION_PREF_WITH_DEFAULT;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Ładowanie…
Reference in New Issue