        break;
      }
    }
  
    const auto &cur_segment = cur->second;
    // merge the previous adjacent segment if it's loaded
    auto begin = segments_.find(cur_segment->seg_num - 1);
    if (begin == segments_.end() || !(begin->second && begin->second->isLoaded())) {
      begin = cur;
    }
    mergeSegments(begin, end);
  
    // free segments out of current semgnt window.
    std::for_each(segments_.begin(), begin, [](auto &e) { e.second.reset(nullptr); });
    std::for_each(end, segments_.end(), [](auto &e) { e.second.reset(nullptr); });
 
</s> remove     emit dataChanged(index(0, 0), index(rowCount() - 1, columnCount() - 1), {Qt::DisplayRole});
 </s> add     auto new_msgs = fetchData(0, messages.back().mono_time);
    if ((has_more_data = !new_msgs.empty())) {
      beginInsertRows({}, messages.size(), messages.size() + new_msgs.size() - 1);
      messages.insert(messages.end(), std::move_iterator(new_msgs.begin()), std::move_iterator(new_msgs.end()));
      endInsertRows();
    } </s> remove     return !sigs.empty() ? QString::number(get_raw_value((uint8_t *)m.dat.data(), m.dat.size(), *sigs[index.column() - 1]))
                         : toHex(m.dat);
 </s> add     return !sigs.empty() ? QString::number(m.sig_values[index.column() - 1]) : toHex(m.data);
        break;
      }
    }
  






    mergeSegments(begin, end);
  
    // free segments out of current semgnt window.
    std::for_each(segments_.begin(), begin, [](auto &e) { e.second.reset(nullptr); });
    std::for_each(end, segments_.end(), [](auto &e) { e.second.reset(nullptr); });
keep keep keep keep replace replace replace replace replace replace keep keep keep keep keep
 Cabana: display all logs in log view (#26659)

* fetch more

* clear log in showevent

* fix wrong time value

* check list size

* fix canmessages::process

* cache all events

* improve segment cache

* cleanup 
tools/replay/replay.cc