TabbedPane: disable all items in "Show Hidden Tabs" popup menu if tabbed pane is disabled

This commit is contained in:
Karl Tauber
2022-03-17 12:42:49 +01:00
parent 53f2730064
commit 0bf87b753d
2 changed files with 3 additions and 1 deletions

View File

@@ -21,6 +21,8 @@ FlatLaf Change Log
(issue #493)
- TextArea, TextPane and EditorPane: No longer select all text when component is
focused for the first time. (issue #498; regression in FlatLaf 2.0)
- TabbedPane: Disable all items in "Show Hidden Tabs" popup menu if tabbed pane
is disabled.
#### Incompatibilities

View File

@@ -2016,7 +2016,7 @@ public class FlatTabbedPaneUI
menuItem.setOpaque( true );
}
if( !tabPane.isEnabledAt( tabIndex ) )
if( !tabPane.isEnabled() || !tabPane.isEnabledAt( tabIndex ) )
menuItem.setEnabled( false );
menuItem.addActionListener( e -> selectTab( tabIndex ) );