From ee5bc17c1928c06da26c78730f778b64852c48ca Mon Sep 17 00:00:00 2001 From: Lars Vogel Date: Mon, 7 Jul 2025 19:07:32 +0200 Subject: [PATCH] Prevent mouse wheel from changing selection in product and application combo Disables mouse wheel scrolling on the product and application selection combo to avoid accidental selection changes when the user scrolls over the control. This improves usability when the combo is hovered during scroll operations, especially in scrollable containers. Fixes: https://github.com/eclipse-pde/eclipse.pde/issues/1854 --- .../internal/ui/editor/product/ProductInfoSection.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/ProductInfoSection.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/ProductInfoSection.java index 4193b647062..dd240ff95bf 100644 --- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/ProductInfoSection.java +++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/ProductInfoSection.java @@ -231,7 +231,10 @@ private void createProductEntry(Composite client, FormToolkit toolkit) { fProductCombo.add(""); //$NON-NLS-1$ fProductCombo.addSelectionListener( widgetSelectedAdapter(e -> getProduct().setProductId(fProductCombo.getSelection()))); - + fProductCombo.getControl().addListener(SWT.MouseWheel, event -> { + // Cancel the event to prevent default scrolling + event.doit = false; + }); Button button = toolkit.createButton(client, PDEUIMessages.ProductInfoSection_new, SWT.PUSH); button.setEnabled(isEditable()); button.addSelectionListener(widgetSelectedAdapter(e -> handleNewDefinition())); @@ -264,7 +267,10 @@ private void createApplicationEntry(Composite client, FormToolkit toolkit) { fAppCombo.add(""); //$NON-NLS-1$ fAppCombo.addSelectionListener( widgetSelectedAdapter(e -> getProduct().setApplication(fAppCombo.getSelection()))); - + fProductCombo.getControl().addListener(SWT.MouseWheel, event -> { + // Cancel the event to prevent default scrolling + event.doit = false; + }); fAppCombo.getControl().setEnabled(isEditable()); }