Commit c0dccd6f authored by Adrien Maglo's avatar Adrien Maglo

Qt/EPG: Fix event deletion.

parent ec1859e9
...@@ -116,7 +116,7 @@ void EPGWidget::updateEPG( vlc_epg_t **pp_epg, int i_epg ) ...@@ -116,7 +116,7 @@ void EPGWidget::updateEPG( vlc_epg_t **pp_epg, int i_epg )
} }
// Remove old items // Remove old items
QMap<QString, EPGEvent*>::iterator i = m_events.begin(); QMultiMap<QString, EPGEvent*>::iterator i = m_events.begin();
while ( i != m_events.end() ) while ( i != m_events.end() )
{ {
EPGEvent* item = i.value(); EPGEvent* item = i.value();
...@@ -124,7 +124,8 @@ void EPGWidget::updateEPG( vlc_epg_t **pp_epg, int i_epg ) ...@@ -124,7 +124,8 @@ void EPGWidget::updateEPG( vlc_epg_t **pp_epg, int i_epg )
{ {
m_epgView->delEvent( item ); m_epgView->delEvent( item );
delete item; delete item;
i = m_events.erase( i ); i--;
m_events.erase( i + 1 );
} }
else else
item->updated = false; item->updated = false;
...@@ -135,5 +136,7 @@ void EPGWidget::updateEPG( vlc_epg_t **pp_epg, int i_epg ) ...@@ -135,5 +136,7 @@ void EPGWidget::updateEPG( vlc_epg_t **pp_epg, int i_epg )
// Update the global duration and start time. // Update the global duration and start time.
m_epgView->updateDuration(); m_epgView->updateDuration();
m_epgView->updateStartTime(); m_epgView->updateStartTime();
// Udate the channel list.
m_channelsWidget->update();
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment