After code review fixes 2

This commit is contained in:
nazar-kutz 2021-03-22 14:40:49 +02:00
parent 5ae37a101c
commit b034db4f39

View file

@ -203,9 +203,8 @@ public class RouteLineColorCard extends BaseCard implements CardListener, ColorP
private void updateColorName() { private void updateColorName() {
if (selectedMode == ColorMode.DEFAULT) { if (selectedMode == ColorMode.DEFAULT) {
tvColorName.setText(app.getString(R.string.map_widget_renderer)); tvColorName.setText(app.getString(R.string.map_widget_renderer));
} else { } else if (routeLineDrawInfo.getColor() != null) {
int selectedColor = routeLineDrawInfo.getColor(); int colorNameId = ColorDialogs.getColorName(routeLineDrawInfo.getColor());
int colorNameId = ColorDialogs.getColorName(selectedColor);
tvColorName.setText(app.getString(colorNameId)); tvColorName.setText(app.getString(colorNameId));
} }
} }