From c445e45b60246736875c4a998ffa46572766b046 Mon Sep 17 00:00:00 2001 From: Skalii Date: Fri, 19 Feb 2021 05:35:29 +0200 Subject: [PATCH] fix incorrect error display and file name change; --- .../SaveAsNewTrackBottomSheetDialogFragment.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/SaveAsNewTrackBottomSheetDialogFragment.java b/OsmAnd/src/net/osmand/plus/measurementtool/SaveAsNewTrackBottomSheetDialogFragment.java index 224594f9bd..2aef0c64cf 100644 --- a/OsmAnd/src/net/osmand/plus/measurementtool/SaveAsNewTrackBottomSheetDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/measurementtool/SaveAsNewTrackBottomSheetDialogFragment.java @@ -129,6 +129,8 @@ public class SaveAsNewTrackBottomSheetDialogFragment extends MenuBottomSheetDial .create(); this.items.add(editFileName); + updateFileNameFromEditText(fileName); + int contentPaddingSmall = app.getResources().getDimensionPixelSize(R.dimen.content_padding_small); int contentPaddingHalf = app.getResources().getDimensionPixelSize(R.dimen.content_padding_half); @@ -360,9 +362,9 @@ public class SaveAsNewTrackBottomSheetDialogFragment extends MenuBottomSheetDial } else { nameTextBox.setError(null); nameTextBox.setErrorEnabled(false); - fileName = text; rightButtonEnabled = true; } + fileName = text; updateBottomButtons(); } @@ -404,6 +406,7 @@ public class SaveAsNewTrackBottomSheetDialogFragment extends MenuBottomSheetDial if (position != -1) { recyclerView.scrollToPosition(position); } + updateFileNameFromEditText(Algorithms.getFileNameWithoutExtension(dest.getName())); } }