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:
Gregory Nutt 2014-07-22 07:40:39 -06:00
parent 1cf57a4097
commit ad2aa947f1

View File

@ -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)