(cherry picked from commit c0ba5bdcfd
)
This commit is contained in:
parent
264a8d3d75
commit
7981e750f7
3 changed files with 15 additions and 4 deletions
|
@ -414,7 +414,18 @@ public class MeasurementToolFragment extends BaseOsmAndFragment {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
if (editingCtx.getPointsCount() > 0) {
|
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 {
|
} else {
|
||||||
Toast.makeText(mapActivity, getString(R.string.none_point_error), Toast.LENGTH_SHORT).show();
|
Toast.makeText(mapActivity, getString(R.string.none_point_error), Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
|
|
|
@ -100,7 +100,7 @@ public class GPXLayer extends OsmandMapLayer implements ContextMenuLayer.IContex
|
||||||
private Paint paintTextIcon;
|
private Paint paintTextIcon;
|
||||||
|
|
||||||
private OsmandRenderer osmandRenderer;
|
private OsmandRenderer osmandRenderer;
|
||||||
|
private int hsh;
|
||||||
private GPXFile gpx;
|
private GPXFile gpx;
|
||||||
|
|
||||||
private ContextMenuLayer contextMenuLayer;
|
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) {
|
private int updatePaints(int color, boolean routePoints, boolean currentTrack, DrawSettings nightMode, RotatedTileBox tileBox) {
|
||||||
RenderingRulesStorage rrs = view.getApplication().getRendererRegistry().getCurrentSelectedRenderer();
|
RenderingRulesStorage rrs = view.getApplication().getRendererRegistry().getCurrentSelectedRenderer();
|
||||||
final boolean isNight = nightMode != null && nightMode.isNightMode();
|
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_COLOR_ATTR).get(),
|
||||||
view.getSettings().getCustomRenderProperty(CURRENT_TRACK_WIDTH_ATTR).get());
|
view.getSettings().getCustomRenderProperty(CURRENT_TRACK_WIDTH_ATTR).get());
|
||||||
if (hsh != cachedHash) {
|
if (hsh != cachedHash) {
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
# Specifies the JVM arguments used for the daemon process.
|
# Specifies the JVM arguments used for the daemon process.
|
||||||
# The setting is particularly useful for tweaking memory settings.
|
# The setting is particularly useful for tweaking memory settings.
|
||||||
# Default value: -Xmx10248m -XX:MaxPermSize=256m
|
# 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.
|
# When configured, Gradle will run in incubating parallel mode.
|
||||||
# This option should only be used with decoupled projects. More details, visit
|
# This option should only be used with decoupled projects. More details, visit
|
||||||
|
|
Loading…
Reference in a new issue