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
Taylor Smock 2019-10-21 16:01:19 -06:00
rodzic 297ce7289a
commit 9585709a47
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 625F6A74A3E4311A
3 zmienionych plików z 6 dodań i 8 usunięć

Wyświetl plik

@ -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);

Wyświetl plik

@ -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());
}

Wyświetl plik

@ -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);
}
}