Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix blinking arrows while trip is recording #21508

Merged
merged 1 commit into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions OsmAnd/src/net/osmand/plus/views/layers/GPXLayer.java
Original file line number Diff line number Diff line change
Expand Up @@ -1224,9 +1224,12 @@ private void drawSelectedFileSegments(SelectedGpxFile selectedGpxFile, boolean c
GpxGeometryWay geometryWay = new GpxGeometryWay(wayContext);
geometryWay.updateTrack3DStyle(track3DStyle);
geometryWay.updateColoringType(coloringType);
geometryWay.updateCustomWidth(paint.getStrokeWidth());
if (!oldSegments.isEmpty() && oldSegments.get(0).getRenderer() instanceof RenderableSegment renderableSegment) {
geometryWay.vectorLinesCollection = renderableSegment.getGeometryWay().vectorLinesCollection;
geometryWay.vectorLineArrowsProvider = renderableSegment.getGeometryWay().vectorLineArrowsProvider;
geometryWay.updateCustomWidth(renderableSegment.getGeometryWay().getCustomWidth());
geometryWay.updateDrawDirectionArrows(renderableSegment.getGeometryWay().getDrawDirectionArrows());
oldSegments.remove(0);
}
geometryWay.baseOrder = baseOrder--;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import android.os.Message;
import android.text.TextPaint;
import android.text.TextUtils;
import android.util.Log;
import android.util.Pair;
import android.view.GestureDetector;
import android.view.MotionEvent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@ public void setTrackStyleParams(int trackColor,
this.gradientPalette = gradientPalette;
}

public boolean getDrawDirectionArrows() {
return drawDirectionArrows;
}

public void updateDrawDirectionArrows(boolean drawDirectionArrows) {
this.drawDirectionArrows = drawDirectionArrows;
}

public void updateSegment(RotatedTileBox tb, List<WptPt> points,
List<RouteSegmentResult> routeSegments, boolean forceUpdate) {
if (coloringChanged || forceUpdate || tb.getMapDensity() != getMapDensity()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,14 @@ public void updateColoringType(@NonNull ColoringType routeColoringType) {
coloringType = routeColoringType;
}

public float getCustomWidth() {
return this.customWidth;
}

public void updateCustomWidth(@NonNull float customWidth) {
this.customWidth = customWidth;
}

protected void updateStylesDashPattern(@Nullable float[] dashPattern) {
for (GeometryWayStyle<?> style : styleMap.values()) {
style.dashPattern = dashPattern;
Expand Down
Loading