mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-09 08:15:09 +03:00
ToolBar: fixed endless loop in focus navigation that may occur under special circumstances (issue #505)
This commit is contained in:
@@ -256,11 +256,15 @@ public class FlatToolBarUI
|
||||
default: return;
|
||||
}
|
||||
|
||||
for( int i = focusedCompIndex + add; i != focusedCompIndex; i += add ) {
|
||||
int i = focusedCompIndex;
|
||||
for(;;) {
|
||||
i += add;
|
||||
if( i < 0 )
|
||||
i = count - 1;
|
||||
else if( i >= count )
|
||||
i = 0;
|
||||
if( i == focusedCompIndex )
|
||||
break;
|
||||
|
||||
Component c = toolBar.getComponentAtIndex( i );
|
||||
if( canBeFocusOwner( c ) ) {
|
||||
|
||||
Reference in New Issue
Block a user