mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-09-04 16:13:03 +00:00
NxWidgets::CTabPanel: Modify behavior in showPage() method. Eliminate a duplicate redraw that caused flickering; re-order some logic so that widgets are hidden before operated on. From Petteri Aimonen
This commit is contained in:
parent
1cf57a4097
commit
ad2aa947f1
1 changed files with 4 additions and 7 deletions
|
|
@ -103,18 +103,15 @@ void CTabPanel::showPage(uint8_t index)
|
|||
|
||||
for (int i = 0; i < m_tabpages.size(); i++)
|
||||
{
|
||||
if (i == index)
|
||||
{
|
||||
m_tabpages.at(i)->enable();
|
||||
m_tabpages.at(i)->show();
|
||||
m_tabpages.at(i)->redraw();
|
||||
}
|
||||
else
|
||||
if (i != index)
|
||||
{
|
||||
m_tabpages.at(i)->hide();
|
||||
m_tabpages.at(i)->disable();
|
||||
}
|
||||
}
|
||||
|
||||
m_tabpages.at(index)->enable();
|
||||
m_tabpages.at(index)->show();
|
||||
}
|
||||
|
||||
void CTabPanel::handleActionEvent(const CWidgetEventArgs &e)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue