summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-07-22 07:40:39 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-07-22 07:40:39 -0600
commite65124097e9e6d18a422de28f7e16dad50f665e5 (patch)
tree5f17e64c954f5fa2526b53cec100970765a1f585
parentda87ef2d2fbe270ce42aa6b1d8f29582f012bdde (diff)
downloadnuttx-e65124097e9e6d18a422de28f7e16dad50f665e5.tar.gz
nuttx-e65124097e9e6d18a422de28f7e16dad50f665e5.tar.bz2
nuttx-e65124097e9e6d18a422de28f7e16dad50f665e5.zip
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
-rw-r--r--NxWidgets/libnxwidgets/src/ctabpanel.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/NxWidgets/libnxwidgets/src/ctabpanel.cxx b/NxWidgets/libnxwidgets/src/ctabpanel.cxx
index 1f1769e00..ed7524edb 100644
--- a/NxWidgets/libnxwidgets/src/ctabpanel.cxx
+++ b/NxWidgets/libnxwidgets/src/ctabpanel.cxx
@@ -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)