Skip to content

Commit

Permalink
Add early return to ToolBar::handleDPIChange in case it has no items
Browse files Browse the repository at this point in the history
No need to send OS events if there are no children to process in the
toolbar
  • Loading branch information
fedejeanne committed Aug 8, 2024
1 parent 1ca1ab3 commit 0af7bbc
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1754,6 +1754,10 @@ private static void handleDPIChange(Widget widget, int newZoom, float scalingFac
var seperatorWidth = new int[toolItems.length];
int itemCount = toolItems.length;

if (itemCount == 0) {
return;
}

record ToolItemData(ToolItem toolItem, TBBUTTON button) {
}

Expand Down

0 comments on commit 0af7bbc

Please sign in to comment.