From 6223aa1a953f566c1248018a3b42ec81fcaae2fa Mon Sep 17 00:00:00 2001 From: madwasp79 Date: Mon, 11 Mar 2019 11:21:45 +0200 Subject: [PATCH 1/8] Issue #6222 - GPX track appearance doesn't update until Osmand closed and restarted, or screen is rotated - fixed --- OsmAnd/src/net/osmand/plus/views/GPXLayer.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/views/GPXLayer.java b/OsmAnd/src/net/osmand/plus/views/GPXLayer.java index 0fa90a1abf..041038daa2 100644 --- a/OsmAnd/src/net/osmand/plus/views/GPXLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/GPXLayer.java @@ -1,5 +1,8 @@ package net.osmand.plus.views; +import static net.osmand.plus.dialogs.ConfigureMapMenu.CURRENT_TRACK_COLOR_ATTR; +import static net.osmand.plus.dialogs.ConfigureMapMenu.CURRENT_TRACK_WIDTH_ATTR; + import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; @@ -214,23 +217,25 @@ public class GPXLayer extends OsmandMapLayer implements ContextMenuLayer.IContex private int updatePaints(int color, boolean routePoints, boolean currentTrack, DrawSettings nightMode, RotatedTileBox tileBox) { RenderingRulesStorage rrs = view.getApplication().getRendererRegistry().getCurrentSelectedRenderer(); final boolean isNight = nightMode != null && nightMode.isNightMode(); - int hsh = calculateHash(rrs, routePoints, isNight, tileBox.getMapDensity(), tileBox.getZoom()); + int hsh = calculateHash(rrs, routePoints, isNight, tileBox.getMapDensity(), tileBox.getZoom(), + view.getSettings().getCustomRenderProperty(CURRENT_TRACK_COLOR_ATTR).get(), + view.getSettings().getCustomRenderProperty(CURRENT_TRACK_WIDTH_ATTR).get()); if (hsh != cachedHash) { cachedHash = hsh; cachedColor = ContextCompat.getColor(view.getApplication(), R.color.gpx_track); if (rrs != null) { RenderingRuleSearchRequest req = new RenderingRuleSearchRequest(rrs); req.setBooleanFilter(rrs.PROPS.R_NIGHT_MODE, isNight); - CommonPreference p = view.getSettings().getCustomRenderProperty("currentTrackColor"); + CommonPreference p = view.getSettings().getCustomRenderProperty(CURRENT_TRACK_COLOR_ATTR); if (p != null && p.isSet()) { - RenderingRuleProperty ctColor = rrs.PROPS.get("currentTrackColor"); + RenderingRuleProperty ctColor = rrs.PROPS.get(CURRENT_TRACK_COLOR_ATTR); if (ctColor != null) { req.setStringFilter(ctColor, p.get()); } } - CommonPreference p2 = view.getSettings().getCustomRenderProperty("currentTrackWidth"); + CommonPreference p2 = view.getSettings().getCustomRenderProperty(CURRENT_TRACK_WIDTH_ATTR); if (p2 != null && p2.isSet()) { - RenderingRuleProperty ctWidth = rrs.PROPS.get("currentTrackWidth"); + RenderingRuleProperty ctWidth = rrs.PROPS.get(CURRENT_TRACK_WIDTH_ATTR); if (ctWidth != null) { req.setStringFilter(ctWidth, p2.get()); } From 9fe525ae708d9fa43971c955628cf603e78c26f3 Mon Sep 17 00:00:00 2001 From: madwasp79 Date: Mon, 11 Mar 2019 17:00:38 +0200 Subject: [PATCH 2/8] Issue #6140 - Saving snapped to route GPX track to new track - fixed --- .../plus/measurementtool/OptionsBottomSheetDialogFragment.java | 2 +- gradle.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/OptionsBottomSheetDialogFragment.java b/OsmAnd/src/net/osmand/plus/measurementtool/OptionsBottomSheetDialogFragment.java index 7bdba8dbf6..8b790267f1 100644 --- a/OsmAnd/src/net/osmand/plus/measurementtool/OptionsBottomSheetDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/measurementtool/OptionsBottomSheetDialogFragment.java @@ -54,7 +54,7 @@ public class OptionsBottomSheetDialogFragment extends MenuBottomSheetDialogFragm items.add(new DividerHalfItem(getContext())); - if (addLineMode) { + if (addLineMode && !snapToRoadEnabled) { BaseBottomSheetItem saveAsNewSegmentItem = new SimpleBottomSheetItem.Builder() .setIcon(getContentIcon(R.drawable.ic_action_polygom_dark)) .setTitle(getString(R.string.shared_string_save)) diff --git a/gradle.properties b/gradle.properties index 3bb8ab935d..5230a4c9b3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,7 +6,7 @@ # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. # Default value: -Xmx10248m -XX:MaxPermSize=256m -# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 + org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 # # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit From a224e9e6964c783858c2be27346a8b5380a7b246 Mon Sep 17 00:00:00 2001 From: Denis Kolomiets Date: Tue, 12 Mar 2019 09:20:57 +0200 Subject: [PATCH 3/8] Update gradle.properties --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 5230a4c9b3..3bb8ab935d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,7 +6,7 @@ # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. # Default value: -Xmx10248m -XX:MaxPermSize=256m - org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 +# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 # # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit From 2165e84816c86d62d81453167629672e8aa63df8 Mon Sep 17 00:00:00 2001 From: madwasp79 Date: Tue, 12 Mar 2019 17:34:41 +0200 Subject: [PATCH 4/8] Issue #6140 - Saving snapped to route GPX track to new track - reworked --- .../MeasurementToolFragment.java | 27 ++++++++++++++ .../plus/measurementtool/NewGpxData.java | 3 +- .../OptionsBottomSheetDialogFragment.java | 35 +++++++++++++++++++ 3 files changed, 64 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java index 76868935a3..f922548fa5 100644 --- a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java +++ b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java @@ -594,6 +594,17 @@ public class MeasurementToolFragment extends BaseOsmAndFragment { } } + @Override + public void overwriteOldTrackOnClick() { + if (mapActivity != null && measurementLayer != null) { + if (editingCtx.getPointsCount() > 0) { + overwriteGpx(mapActivity); + } else { + Toast.makeText(mapActivity, getString(R.string.none_point_error), Toast.LENGTH_SHORT).show(); + } + } + } + @Override public void clearAllOnClick() { editingCtx.getCommandManager().execute(new ClearPointsCommand(measurementLayer)); @@ -1116,6 +1127,14 @@ public class MeasurementToolFragment extends BaseOsmAndFragment { saveExistingGpx(gpx, showOnMap, actionType, true); } + private void overwriteGpx(MapActivity mapActivity) { + GPXFile gpx = editingCtx.getNewGpxData().getGpxFile(); + SelectedGpxFile selectedGpxFile = mapActivity.getMyApplication().getSelectedGpxHelper().getSelectedFileByPath(gpx.path); + boolean showOnMap = selectedGpxFile != null; + ActionType actionType = ActionType.OVERWRITE_SEGMENT; + saveExistingGpx(gpx, showOnMap, actionType, true); + } + private void saveAsGpx(final SaveType saveType) { MapActivity mapActivity = getMapActivity(); if (mapActivity != null) { @@ -1297,6 +1316,14 @@ public class MeasurementToolFragment extends BaseOsmAndFragment { segment.points.addAll(points); gpx.replaceSegment(editingCtx.getNewGpxData().getTrkSegment(), segment); break; + case OVERWRITE_SEGMENT: + List snappedPoints = new ArrayList<>(); + snappedPoints.addAll(before.points); + snappedPoints.addAll(after.points); + TrkSegment segment1 = new TrkSegment(); + segment1.points.addAll(snappedPoints); + gpx.replaceSegment(editingCtx.getNewGpxData().getTrkSegment(), segment1); + break; } } else { gpx.addRoutePoints(points); diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/NewGpxData.java b/OsmAnd/src/net/osmand/plus/measurementtool/NewGpxData.java index 7476be01b1..9da060fdee 100644 --- a/OsmAnd/src/net/osmand/plus/measurementtool/NewGpxData.java +++ b/OsmAnd/src/net/osmand/plus/measurementtool/NewGpxData.java @@ -8,7 +8,8 @@ public class NewGpxData { public enum ActionType { ADD_SEGMENT, ADD_ROUTE_POINTS, - EDIT_SEGMENT + EDIT_SEGMENT, + OVERWRITE_SEGMENT } private GPXUtilities.GPXFile gpxFile; diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/OptionsBottomSheetDialogFragment.java b/OsmAnd/src/net/osmand/plus/measurementtool/OptionsBottomSheetDialogFragment.java index 8b790267f1..6ef4ccf988 100644 --- a/OsmAnd/src/net/osmand/plus/measurementtool/OptionsBottomSheetDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/measurementtool/OptionsBottomSheetDialogFragment.java @@ -70,6 +70,39 @@ public class OptionsBottomSheetDialogFragment extends MenuBottomSheetDialogFragm }) .create(); items.add(saveAsNewSegmentItem); + } else if (addLineMode) { + + BaseBottomSheetItem saveAsNewTrackItem = new SimpleBottomSheetItem.Builder() + .setIcon(getContentIcon(R.drawable.ic_action_polygom_dark)) + .setTitle(getString(R.string.shared_string_save_as_gpx)) + .setLayoutId(R.layout.bottom_sheet_item_simple) + .setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + if (listener != null) { + listener.saveAsNewTrackOnClick(); + } + dismiss(); + } + }) + .create(); + items.add(saveAsNewTrackItem); + + BaseBottomSheetItem saveAsNewSegmentItem = new SimpleBottomSheetItem.Builder() + .setIcon(getContentIcon(R.drawable.ic_action_polygom_dark)) + .setTitle("Overwrite GPX") + .setLayoutId(R.layout.bottom_sheet_item_simple) + .setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + if (listener != null) { + listener.overwriteOldTrackOnClick(); + } + dismiss(); + } + }) + .create(); + items.add(saveAsNewSegmentItem); } else { BaseBottomSheetItem saveAsNewTrackItem = new SimpleBottomSheetItem.Builder() .setIcon(getContentIcon(R.drawable.ic_action_polygom_dark)) @@ -138,6 +171,8 @@ public class OptionsBottomSheetDialogFragment extends MenuBottomSheetDialogFragm void addToTheTrackOnClick(); + void overwriteOldTrackOnClick(); + void clearAllOnClick(); } } From c0ba5bdcfd52c6e832cbe0b1ee4cf90960b3ae1e Mon Sep 17 00:00:00 2001 From: madwasp79 Date: Thu, 14 Mar 2019 16:15:22 +0200 Subject: [PATCH 5/8] pull request fixes to Issue #6140 & #6222 --- .../measurementtool/MeasurementToolFragment.java | 13 ++++++++++++- OsmAnd/src/net/osmand/plus/views/GPXLayer.java | 4 ++-- gradle.properties | 2 +- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java index f922548fa5..51e7111ecd 100644 --- a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java +++ b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java @@ -414,7 +414,18 @@ public class MeasurementToolFragment extends BaseOsmAndFragment { @Override public void onClick(View v) { if (editingCtx.getPointsCount() > 0) { - addToGpx(mapActivity); + if (newGpxData!=null && newGpxData.getActionType() + == NewGpxData.ActionType.EDIT_SEGMENT && editingCtx.isInSnapToRoadMode()) { + if (mapActivity != null && measurementLayer != null) { + if (editingCtx.getPointsCount() > 0) { + openSaveAsNewTrackMenu(mapActivity); + } else { + Toast.makeText(mapActivity, getString(R.string.none_point_error), Toast.LENGTH_SHORT).show(); + } + } + } else { + addToGpx(mapActivity); + } } else { Toast.makeText(mapActivity, getString(R.string.none_point_error), Toast.LENGTH_SHORT).show(); } diff --git a/OsmAnd/src/net/osmand/plus/views/GPXLayer.java b/OsmAnd/src/net/osmand/plus/views/GPXLayer.java index 041038daa2..2f532636be 100644 --- a/OsmAnd/src/net/osmand/plus/views/GPXLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/GPXLayer.java @@ -100,7 +100,7 @@ public class GPXLayer extends OsmandMapLayer implements ContextMenuLayer.IContex private Paint paintTextIcon; private OsmandRenderer osmandRenderer; - + private int hsh; private GPXFile gpx; private ContextMenuLayer contextMenuLayer; @@ -217,7 +217,7 @@ public class GPXLayer extends OsmandMapLayer implements ContextMenuLayer.IContex private int updatePaints(int color, boolean routePoints, boolean currentTrack, DrawSettings nightMode, RotatedTileBox tileBox) { RenderingRulesStorage rrs = view.getApplication().getRendererRegistry().getCurrentSelectedRenderer(); final boolean isNight = nightMode != null && nightMode.isNightMode(); - int hsh = calculateHash(rrs, routePoints, isNight, tileBox.getMapDensity(), tileBox.getZoom(), + hsh = calculateHash(rrs, routePoints, isNight, tileBox.getMapDensity(), tileBox.getZoom(), view.getSettings().getCustomRenderProperty(CURRENT_TRACK_COLOR_ATTR).get(), view.getSettings().getCustomRenderProperty(CURRENT_TRACK_WIDTH_ATTR).get()); if (hsh != cachedHash) { diff --git a/gradle.properties b/gradle.properties index 3bb8ab935d..5230a4c9b3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,7 +6,7 @@ # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. # Default value: -Xmx10248m -XX:MaxPermSize=256m -# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 + org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 # # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit From 0d13a314a3c4e4e6d0c9bcb87f1a01a618f98f5b Mon Sep 17 00:00:00 2001 From: madwasp79 Date: Thu, 14 Mar 2019 17:04:22 +0200 Subject: [PATCH 6/8] Issue #6187 - Tracks - Show on map button re-opens wrong sub-folder --- OsmAnd/src/net/osmand/plus/views/GPXLayer.java | 12 ++++++++---- gradle.properties | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/views/GPXLayer.java b/OsmAnd/src/net/osmand/plus/views/GPXLayer.java index 2f532636be..626400cab9 100644 --- a/OsmAnd/src/net/osmand/plus/views/GPXLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/GPXLayer.java @@ -100,7 +100,7 @@ public class GPXLayer extends OsmandMapLayer implements ContextMenuLayer.IContex private Paint paintTextIcon; private OsmandRenderer osmandRenderer; - private int hsh; + private GPXFile gpx; private ContextMenuLayer contextMenuLayer; @@ -111,12 +111,17 @@ public class GPXLayer extends OsmandMapLayer implements ContextMenuLayer.IContex @ColorInt private int grayColor; + private CommonPreference currentTrackColorPref; + private CommonPreference currentTrackWidthPref; + @Override public void initLayer(OsmandMapTileView view) { this.view = view; selectedGpxHelper = view.getApplication().getSelectedGpxHelper(); mapMarkersHelper = view.getApplication().getMapMarkersHelper(); osmandRenderer = view.getApplication().getResourceManager().getRenderer().getRenderer(); + currentTrackColorPref = view.getSettings().getCustomRenderProperty(CURRENT_TRACK_COLOR_ATTR); + currentTrackWidthPref = view.getSettings().getCustomRenderProperty(CURRENT_TRACK_WIDTH_ATTR); initUI(); } @@ -217,9 +222,8 @@ public class GPXLayer extends OsmandMapLayer implements ContextMenuLayer.IContex private int updatePaints(int color, boolean routePoints, boolean currentTrack, DrawSettings nightMode, RotatedTileBox tileBox) { RenderingRulesStorage rrs = view.getApplication().getRendererRegistry().getCurrentSelectedRenderer(); final boolean isNight = nightMode != null && nightMode.isNightMode(); - hsh = calculateHash(rrs, routePoints, isNight, tileBox.getMapDensity(), tileBox.getZoom(), - view.getSettings().getCustomRenderProperty(CURRENT_TRACK_COLOR_ATTR).get(), - view.getSettings().getCustomRenderProperty(CURRENT_TRACK_WIDTH_ATTR).get()); + int hsh = calculateHash(rrs, routePoints, isNight, tileBox.getMapDensity(), tileBox.getZoom(), + currentTrackColorPref.get(), currentTrackWidthPref.get()); if (hsh != cachedHash) { cachedHash = hsh; cachedColor = ContextCompat.getColor(view.getApplication(), R.color.gpx_track); diff --git a/gradle.properties b/gradle.properties index 5230a4c9b3..3bb8ab935d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,7 +6,7 @@ # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. # Default value: -Xmx10248m -XX:MaxPermSize=256m - org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 +# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 # # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit From 231550951ea490a6ca6b01e8235b7fcca50acff6 Mon Sep 17 00:00:00 2001 From: madwasp79 Date: Thu, 14 Mar 2019 17:04:22 +0200 Subject: [PATCH 7/8] Issue #6187 - Tracks - Show on map button re-opens wrong sub-folder --- .../measurementtool/MeasurementToolFragment.java | 2 +- OsmAnd/src/net/osmand/plus/views/GPXLayer.java | 12 ++++++++---- gradle.properties | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java index 51e7111ecd..0cad96ecca 100644 --- a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java +++ b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java @@ -414,7 +414,7 @@ public class MeasurementToolFragment extends BaseOsmAndFragment { @Override public void onClick(View v) { if (editingCtx.getPointsCount() > 0) { - if (newGpxData!=null && newGpxData.getActionType() + if (newGpxData != null && newGpxData.getActionType() == NewGpxData.ActionType.EDIT_SEGMENT && editingCtx.isInSnapToRoadMode()) { if (mapActivity != null && measurementLayer != null) { if (editingCtx.getPointsCount() > 0) { diff --git a/OsmAnd/src/net/osmand/plus/views/GPXLayer.java b/OsmAnd/src/net/osmand/plus/views/GPXLayer.java index 2f532636be..626400cab9 100644 --- a/OsmAnd/src/net/osmand/plus/views/GPXLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/GPXLayer.java @@ -100,7 +100,7 @@ public class GPXLayer extends OsmandMapLayer implements ContextMenuLayer.IContex private Paint paintTextIcon; private OsmandRenderer osmandRenderer; - private int hsh; + private GPXFile gpx; private ContextMenuLayer contextMenuLayer; @@ -111,12 +111,17 @@ public class GPXLayer extends OsmandMapLayer implements ContextMenuLayer.IContex @ColorInt private int grayColor; + private CommonPreference currentTrackColorPref; + private CommonPreference currentTrackWidthPref; + @Override public void initLayer(OsmandMapTileView view) { this.view = view; selectedGpxHelper = view.getApplication().getSelectedGpxHelper(); mapMarkersHelper = view.getApplication().getMapMarkersHelper(); osmandRenderer = view.getApplication().getResourceManager().getRenderer().getRenderer(); + currentTrackColorPref = view.getSettings().getCustomRenderProperty(CURRENT_TRACK_COLOR_ATTR); + currentTrackWidthPref = view.getSettings().getCustomRenderProperty(CURRENT_TRACK_WIDTH_ATTR); initUI(); } @@ -217,9 +222,8 @@ public class GPXLayer extends OsmandMapLayer implements ContextMenuLayer.IContex private int updatePaints(int color, boolean routePoints, boolean currentTrack, DrawSettings nightMode, RotatedTileBox tileBox) { RenderingRulesStorage rrs = view.getApplication().getRendererRegistry().getCurrentSelectedRenderer(); final boolean isNight = nightMode != null && nightMode.isNightMode(); - hsh = calculateHash(rrs, routePoints, isNight, tileBox.getMapDensity(), tileBox.getZoom(), - view.getSettings().getCustomRenderProperty(CURRENT_TRACK_COLOR_ATTR).get(), - view.getSettings().getCustomRenderProperty(CURRENT_TRACK_WIDTH_ATTR).get()); + int hsh = calculateHash(rrs, routePoints, isNight, tileBox.getMapDensity(), tileBox.getZoom(), + currentTrackColorPref.get(), currentTrackWidthPref.get()); if (hsh != cachedHash) { cachedHash = hsh; cachedColor = ContextCompat.getColor(view.getApplication(), R.color.gpx_track); diff --git a/gradle.properties b/gradle.properties index 5230a4c9b3..3bb8ab935d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,7 +6,7 @@ # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. # Default value: -Xmx10248m -XX:MaxPermSize=256m - org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 +# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 # # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit From 83c7f833d74bf8a8157947acc47c6befd7c9a5a0 Mon Sep 17 00:00:00 2001 From: madwasp79 Date: Thu, 14 Mar 2019 17:18:59 +0200 Subject: [PATCH 8/8] pr fixes #6222, #6140 --- .../osmand/plus/measurementtool/MeasurementToolFragment.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java index 0cad96ecca..a20bb76073 100644 --- a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java +++ b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java @@ -414,8 +414,8 @@ public class MeasurementToolFragment extends BaseOsmAndFragment { @Override public void onClick(View v) { if (editingCtx.getPointsCount() > 0) { - if (newGpxData != null && newGpxData.getActionType() - == NewGpxData.ActionType.EDIT_SEGMENT && editingCtx.isInSnapToRoadMode()) { + if (newGpxData != null && newGpxData.getActionType() == NewGpxData.ActionType.EDIT_SEGMENT + && editingCtx.isInSnapToRoadMode()) { if (mapActivity != null && measurementLayer != null) { if (editingCtx.getPointsCount() > 0) { openSaveAsNewTrackMenu(mapActivity);