mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 08:51:10 +02:00
CSignalBox: add missing member to set frontend
Remove double init of sig items; Will be done already by paintScale(). Ensure reset of last sig value on fe change. Prevent possible segfault if fe is not defined.
This commit is contained in:
@@ -192,7 +192,9 @@ void CSignalBar::initSBarName()
|
||||
void CSignalBar::Refresh()
|
||||
{
|
||||
//get current value from frontend
|
||||
sb_signal = sb_frontend->getSignalStrength();
|
||||
sb_signal = 0;
|
||||
if (sb_frontend)
|
||||
sb_signal = sb_frontend->getSignalStrength();
|
||||
|
||||
//reinit items with current values
|
||||
initSBItems();
|
||||
@@ -242,7 +244,9 @@ void CSignalBar::paint(bool do_save_bg)
|
||||
void CSignalNoiseRatioBar::Refresh()
|
||||
{
|
||||
//get current value from frontend
|
||||
sb_signal = sb_frontend->getSignalNoiseRatio();
|
||||
sb_signal = 0;
|
||||
if (sb_frontend)
|
||||
sb_signal = sb_frontend->getSignalNoiseRatio();
|
||||
|
||||
//reinit items with current values
|
||||
initSBItems();
|
||||
@@ -338,10 +342,8 @@ void CSignalBox::paintScale()
|
||||
void CSignalBox::paint(bool do_save_bg)
|
||||
{
|
||||
//paint frame and body
|
||||
if (!is_painted){
|
||||
initSignalItems();
|
||||
if (!is_painted)
|
||||
paintForm(do_save_bg);
|
||||
}
|
||||
|
||||
//paint current signal value
|
||||
paintScale();
|
||||
|
Reference in New Issue
Block a user