[vlc-commits] commit: Qt/EPG: Fix event deletion. (Adrien Maglo )
git at videolan.org
git at videolan.org
Wed Jul 28 21:33:34 CEST 2010
vlc | branch: master | Adrien Maglo <magsoft at videolan.org> | Wed Jul 28 21:33:14 2010 +0200| [c0dccd6f57da1f9a832aea1402c24c3c33c0da98] | committer: Adrien Maglo
Qt/EPG: Fix event deletion.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c0dccd6f57da1f9a832aea1402c24c3c33c0da98
---
modules/gui/qt4/components/epg/EPGWidget.cpp | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/modules/gui/qt4/components/epg/EPGWidget.cpp b/modules/gui/qt4/components/epg/EPGWidget.cpp
index 948b83c..3bc91ac 100644
--- a/modules/gui/qt4/components/epg/EPGWidget.cpp
+++ b/modules/gui/qt4/components/epg/EPGWidget.cpp
@@ -116,7 +116,7 @@ void EPGWidget::updateEPG( vlc_epg_t **pp_epg, int i_epg )
}
// Remove old items
- QMap<QString, EPGEvent*>::iterator i = m_events.begin();
+ QMultiMap<QString, EPGEvent*>::iterator i = m_events.begin();
while ( i != m_events.end() )
{
EPGEvent* item = i.value();
@@ -124,7 +124,8 @@ void EPGWidget::updateEPG( vlc_epg_t **pp_epg, int i_epg )
{
m_epgView->delEvent( item );
delete item;
- i = m_events.erase( i );
+ i--;
+ m_events.erase( i + 1 );
}
else
item->updated = false;
@@ -135,5 +136,7 @@ void EPGWidget::updateEPG( vlc_epg_t **pp_epg, int i_epg )
// Update the global duration and start time.
m_epgView->updateDuration();
m_epgView->updateStartTime();
+ // Udate the channel list.
+ m_channelsWidget->update();
}
More information about the vlc-commits
mailing list