Better check at focusNextChild for the last element

This commit is contained in:
Markus Gans 2017-06-19 02:12:11 +02:00
parent ddb1c884e4
commit 82869a95b7
1 changed files with 3 additions and 3 deletions

View File

@ -1911,12 +1911,12 @@ bool FWidget::focusNextChild()
{ {
++next_element; ++next_element;
if ( ! (*next_element)->isWidget() )
continue;
if ( next_element == children.end() ) if ( next_element == children.end() )
next_element = children.begin(); next_element = children.begin();
if ( ! (*next_element)->isWidget() )
continue;
next = static_cast<FWidget*>(*next_element); next = static_cast<FWidget*>(*next_element);
} while ( ! next } while ( ! next
|| ! next->isEnabled() || ! next->isEnabled()