Skip to content

Commit 0af7bbc

Browse files
committed
Add early return to ToolBar::handleDPIChange in case it has no items
No need to send OS events if there are no children to process in the toolbar
1 parent 1ca1ab3 commit 0af7bbc

File tree

1 file changed

+4
-0
lines changed
  • bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets

1 file changed

+4
-0
lines changed

bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolBar.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1754,6 +1754,10 @@ private static void handleDPIChange(Widget widget, int newZoom, float scalingFac
17541754
var seperatorWidth = new int[toolItems.length];
17551755
int itemCount = toolItems.length;
17561756

1757+
if (itemCount == 0) {
1758+
return;
1759+
}
1760+
17571761
record ToolItemData(ToolItem toolItem, TBBUTTON button) {
17581762
}
17591763

0 commit comments

Comments
 (0)