Skip to content

Commit 3f7e12e

Browse files
committed
Fixed memory leak in smooth scrolling due to incorrect visibility check.
1 parent 08f9838 commit 3f7e12e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatViewportUI.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public void ancestorAdded( AncestorEvent event ) {
8282
@Override
8383
public void ancestorMoved( AncestorEvent event ) {
8484
JViewport viewport = (JViewport)event.getComponent();
85-
if(viewport.isDisplayable()) {
85+
if(viewport.isShowing()) {
8686
SmoothScrollingHelper.registerViewport( viewport );
8787
} else {
8888
SmoothScrollingHelper.unregisterViewport( viewport );

0 commit comments

Comments
 (0)