kopia lustrzana https://github.com/JOSM/MapWithAI
Move task= in upload hook, remove sync in hashcode (caused program lockup), and changed columns for url in preferences
Signed-off-by: Taylor Smock <taylor.smock@kaart.com>pull/1/head
rodzic
297ce7289a
commit
9585709a47
|
@ -39,7 +39,7 @@ public class MapWithAIPreferences implements SubPreferenceSetting {
|
|||
final JLabel mapWithAIApiUrl = new JLabel(tr("{0} API URL", MapWithAIPlugin.NAME));
|
||||
final JLabel switchLayer = new JLabel(tr("Automatically switch layers"));
|
||||
final JLabel maximumAddition = new JLabel(tr("Maximum features (add)"));
|
||||
final JLabel mergeBuildingWithAddress = new JLabel(tr("Merge existing address nodes onto added buildings?"));
|
||||
final JLabel mergeBuildingWithAddress = new JLabel(tr("Merge address nodes and buildings"));
|
||||
final JPanel container = new JPanel(new GridBagLayout());
|
||||
container.setAlignmentY(Component.TOP_ALIGNMENT);
|
||||
final GridBagConstraints constraints = new GridBagConstraints();
|
||||
|
@ -48,7 +48,7 @@ public class MapWithAIPreferences implements SubPreferenceSetting {
|
|||
possibleMapWithAIApiUrl.setPrototypeDisplayValue("https://example.url/some/end/point");
|
||||
final Component textField = possibleMapWithAIApiUrl.getEditor().getEditorComponent();
|
||||
if (textField instanceof JTextField) {
|
||||
((JTextField) textField).setColumns(36);
|
||||
((JTextField) textField).setColumns(24);
|
||||
}
|
||||
for (final String url : MapWithAIPreferenceHelper.getMapWithAIURLs()) {
|
||||
possibleMapWithAIApiUrl.addItem(url);
|
||||
|
|
|
@ -31,13 +31,13 @@ public class MapWithAIUploadHook implements UploadHook, Destroyable {
|
|||
.getDefaultMaximumAddition()) {
|
||||
sb.append(";maxadd=").append(MapWithAIPreferenceHelper.getMaximumAddition());
|
||||
}
|
||||
if (DetectTaskingManagerUtils.hasTaskingManagerLayer()) {
|
||||
sb.append(";task=").append(DetectTaskingManagerUtils.getTaskingManagerBBox().toStringCSV(","));
|
||||
}
|
||||
if (!MapWithAIPreferenceHelper.getMapWithAIUrl()
|
||||
.equalsIgnoreCase(MapWithAIPreferenceHelper.DEFAULT_MAPWITHAI_API)) {
|
||||
sb.append(";url=").append(MapWithAIPreferenceHelper.getMapWithAIUrl());
|
||||
}
|
||||
if (DetectTaskingManagerUtils.hasTaskingManagerLayer()) {
|
||||
sb.append(";task=").append(DetectTaskingManagerUtils.getTaskingManagerBBox().toStringCSV(","));
|
||||
}
|
||||
tags.put("mapwithai:options", sb.toString());
|
||||
|
||||
}
|
||||
|
|
|
@ -160,8 +160,6 @@ public class MapWithAIAddCommand extends Command implements Runnable {
|
|||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
synchronized (this) {
|
||||
return Objects.hash(editable, mapWithAI, primitives, command, lock);
|
||||
}
|
||||
return Objects.hash(editable, mapWithAI, primitives, lock);
|
||||
}
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue