mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-01 18:01:06 +02:00
CTestMenu: ensure remove hintbox from screen after pressed exit button.
call of hide() was missed.
Use hintbox object on stack.
Is completely sufficient here.
Origin commit data
------------------
Commit: 912ca8647e
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-10-22 (Sat, 22 Oct 2016)
This commit is contained in:
@@ -283,8 +283,8 @@ int CTestMenu::exec(CMenuTarget* parent, const std::string &actionKey)
|
|||||||
neutrino_msg_t msg;
|
neutrino_msg_t msg;
|
||||||
neutrino_msg_data_t data;
|
neutrino_msg_data_t data;
|
||||||
CHintBox * khintBox = NULL;
|
CHintBox * khintBox = NULL;
|
||||||
CHintBox * hintBox = new CHintBox(LOCALE_MESSAGEBOX_INFO, "Press button, or press EXIT to return");
|
CHintBox hintBox(LOCALE_MESSAGEBOX_INFO, "Press button, or press EXIT to return");
|
||||||
hintBox->paint();
|
hintBox.paint();
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
g_RCInput->getMsg(&msg, &data, 100);
|
g_RCInput->getMsg(&msg, &data, 100);
|
||||||
@@ -300,15 +300,15 @@ int CTestMenu::exec(CMenuTarget* parent, const std::string &actionKey)
|
|||||||
delete khintBox;
|
delete khintBox;
|
||||||
}
|
}
|
||||||
khintBox = new CHintBox(LOCALE_MESSAGEBOX_INFO, keyname);
|
khintBox = new CHintBox(LOCALE_MESSAGEBOX_INFO, keyname);
|
||||||
hintBox->hide();
|
hintBox.hide();
|
||||||
khintBox->paint();
|
khintBox->paint();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (khintBox)
|
if (khintBox)
|
||||||
delete khintBox;
|
delete khintBox;
|
||||||
|
|
||||||
delete hintBox;
|
hintBox.hide();
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
#if 0 //some parts DEPRECATED
|
#if 0 //some parts DEPRECATED
|
||||||
|
Reference in New Issue
Block a user