Update recent entry detail when recent entry changes.

This doesn't feel like the right implementation, but I'm feeling impatient today...
This commit is contained in:
Jared Boone 2016-01-15 11:38:49 -08:00
parent c4f7d9bf54
commit e163ed7463

View File

@ -382,8 +382,13 @@ void AISAppView::set_parent_rect(const Rect new_parent_rect) {
void AISAppView::on_packet(const ais::Packet& packet) {
logger.on_packet(packet);
recent.on_packet(packet);
const auto updated_entry = recent.on_packet(packet);
recent_entries_view.set_dirty();
// TODO: Crude hack, should be a more formal listener arrangement...
if( updated_entry.mmsi == recent_entry_detail_view.entry().mmsi ) {
recent_entry_detail_view.set_entry(updated_entry);
}
}
void AISAppView::on_show_list() {