mirror of
https://github.com/infiniteCable2/openpilot.git
synced 2026-07-25 19:32:03 +08:00
jotplugger: render segment range slices properly (#37837)
This commit is contained in:
@@ -276,7 +276,10 @@ struct RouteIdentifier {
|
||||
std::string display_slice() const {
|
||||
const int begin = slice_explicit ? slice_begin : available_begin;
|
||||
const int end = slice_explicit ? slice_end : available_end;
|
||||
if (end < 0 || end == begin) {
|
||||
if (end < 0) {
|
||||
return std::to_string(begin) + ":";
|
||||
}
|
||||
if (end == begin) {
|
||||
return std::to_string(begin);
|
||||
}
|
||||
return std::to_string(begin) + ":" + std::to_string(end);
|
||||
|
||||
@@ -355,7 +355,7 @@ bool apply_route_slice_change(AppSession *session, UiState *state, std::string_v
|
||||
int begin = 0;
|
||||
int end = 0;
|
||||
if (!parse_slice_spec(slice_text, &begin, &end)) {
|
||||
state->error_text = "Slice must be N or N:M.";
|
||||
state->error_text = "Slice must be N, N:, or N:M.";
|
||||
state->open_error_popup = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user