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 mapWithAIApiUrl = new JLabel(tr("{0} API URL", MapWithAIPlugin.NAME));
|
||||||
final JLabel switchLayer = new JLabel(tr("Automatically switch layers"));
|
final JLabel switchLayer = new JLabel(tr("Automatically switch layers"));
|
||||||
final JLabel maximumAddition = new JLabel(tr("Maximum features (add)"));
|
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());
|
final JPanel container = new JPanel(new GridBagLayout());
|
||||||
container.setAlignmentY(Component.TOP_ALIGNMENT);
|
container.setAlignmentY(Component.TOP_ALIGNMENT);
|
||||||
final GridBagConstraints constraints = new GridBagConstraints();
|
final GridBagConstraints constraints = new GridBagConstraints();
|
||||||
|
@ -48,7 +48,7 @@ public class MapWithAIPreferences implements SubPreferenceSetting {
|
||||||
possibleMapWithAIApiUrl.setPrototypeDisplayValue("https://example.url/some/end/point");
|
possibleMapWithAIApiUrl.setPrototypeDisplayValue("https://example.url/some/end/point");
|
||||||
final Component textField = possibleMapWithAIApiUrl.getEditor().getEditorComponent();
|
final Component textField = possibleMapWithAIApiUrl.getEditor().getEditorComponent();
|
||||||
if (textField instanceof JTextField) {
|
if (textField instanceof JTextField) {
|
||||||
((JTextField) textField).setColumns(36);
|
((JTextField) textField).setColumns(24);
|
||||||
}
|
}
|
||||||
for (final String url : MapWithAIPreferenceHelper.getMapWithAIURLs()) {
|
for (final String url : MapWithAIPreferenceHelper.getMapWithAIURLs()) {
|
||||||
possibleMapWithAIApiUrl.addItem(url);
|
possibleMapWithAIApiUrl.addItem(url);
|
||||||
|
|
|
@ -31,13 +31,13 @@ public class MapWithAIUploadHook implements UploadHook, Destroyable {
|
||||||
.getDefaultMaximumAddition()) {
|
.getDefaultMaximumAddition()) {
|
||||||
sb.append(";maxadd=").append(MapWithAIPreferenceHelper.getMaximumAddition());
|
sb.append(";maxadd=").append(MapWithAIPreferenceHelper.getMaximumAddition());
|
||||||
}
|
}
|
||||||
|
if (DetectTaskingManagerUtils.hasTaskingManagerLayer()) {
|
||||||
|
sb.append(";task=").append(DetectTaskingManagerUtils.getTaskingManagerBBox().toStringCSV(","));
|
||||||
|
}
|
||||||
if (!MapWithAIPreferenceHelper.getMapWithAIUrl()
|
if (!MapWithAIPreferenceHelper.getMapWithAIUrl()
|
||||||
.equalsIgnoreCase(MapWithAIPreferenceHelper.DEFAULT_MAPWITHAI_API)) {
|
.equalsIgnoreCase(MapWithAIPreferenceHelper.DEFAULT_MAPWITHAI_API)) {
|
||||||
sb.append(";url=").append(MapWithAIPreferenceHelper.getMapWithAIUrl());
|
sb.append(";url=").append(MapWithAIPreferenceHelper.getMapWithAIUrl());
|
||||||
}
|
}
|
||||||
if (DetectTaskingManagerUtils.hasTaskingManagerLayer()) {
|
|
||||||
sb.append(";task=").append(DetectTaskingManagerUtils.getTaskingManagerBBox().toStringCSV(","));
|
|
||||||
}
|
|
||||||
tags.put("mapwithai:options", sb.toString());
|
tags.put("mapwithai:options", sb.toString());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -160,8 +160,6 @@ public class MapWithAIAddCommand extends Command implements Runnable {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
synchronized (this) {
|
return Objects.hash(editable, mapWithAI, primitives, lock);
|
||||||
return Objects.hash(editable, mapWithAI, primitives, command, lock);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue