diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index 80011f60a..a3ee01741 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -87,6 +87,11 @@ inline static bool sortByDateTime (const CChannelEvent& a, const CChannelEvent& return a.startTime < b.startTime; } +inline static bool sortbyEventid (const CChannelEvent& a, const CChannelEvent& b) +{ + return (a.channelID == b.channelID && a.eventID == b.eventID); +} + CNeutrinoEventList::CNeutrinoEventList() { frameBuffer = CFrameBuffer::getInstance(); @@ -1043,7 +1048,12 @@ bool CNeutrinoEventList::findEvents(void) } box.hide(); } - sort(evtlist.begin(),evtlist.end(),sortByDateTime); + if(!evtlist.empty()){ + sort(evtlist.begin(),evtlist.end(),sortByDateTime); + unique(evtlist.begin(), evtlist.end(),sortbyEventid); + evtlist.erase(unique(evtlist.begin(), evtlist.end(),sortbyEventid), evtlist.end()); + } + current_event = (unsigned int)-1; time_t azeit=time(NULL);