From 386c2b4d09ff4e776b7b507ed8e44b39c81c70b5 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Thu, 28 Sep 2017 14:01:05 +0200 Subject: [PATCH] - bouqueteditor: clear details in infobox if no channels available --- src/gui/bedit/bouqueteditor_channels.cpp | 5 ++++- src/gui/bedit/bouqueteditor_chanselect.cpp | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/gui/bedit/bouqueteditor_channels.cpp b/src/gui/bedit/bouqueteditor_channels.cpp index 532bdb420..e6b0548ed 100644 --- a/src/gui/bedit/bouqueteditor_channels.cpp +++ b/src/gui/bedit/bouqueteditor_channels.cpp @@ -95,7 +95,7 @@ void CBEChannelWidget::paintItem(int pos) if (i_selected) { - if (current < Channels->size()) + if (current < Channels->size() || Channels->empty()) paintDetails(pos, current); i_radius = RADIUS_LARGE; @@ -240,6 +240,9 @@ std::string CBEChannelWidget::getInfoText(int index) { std::string res = ""; + if (Channels->empty()) + return res; + std::string satname = CServiceManager::getInstance()->GetSatelliteName((*Channels)[index]->getSatellitePosition()); if (IS_WEBTV((*Channels)[index]->getChannelID())) satname = "WebTV"; diff --git a/src/gui/bedit/bouqueteditor_chanselect.cpp b/src/gui/bedit/bouqueteditor_chanselect.cpp index 2dc5018cb..39cfacc24 100644 --- a/src/gui/bedit/bouqueteditor_chanselect.cpp +++ b/src/gui/bedit/bouqueteditor_chanselect.cpp @@ -83,7 +83,7 @@ void CBEChannelSelectWidget::paintItem(int pos) if (i_selected) { - if (current < Channels.size()) + if (current < Channels.size() || Channels.empty()) paintDetails(pos, current); i_radius = RADIUS_LARGE; @@ -246,6 +246,9 @@ std::string CBEChannelSelectWidget::getInfoText(int index) { std::string res = ""; + if (Channels.empty()) + return res; + std::string satname = CServiceManager::getInstance()->GetSatelliteName(Channels[index]->getSatellitePosition()); if (IS_WEBTV(Channels[index]->getChannelID())) satname = "WebTV";