#15547 closed defect (fixed)

[wxPropertyGrid] Scrolling by mouse wheel in a "combo box" property scrolls the parent panel as well

Reported by: alexandrub Owned by:
Priority: normal Milestone: 3.0.0
Component: wxPropertyGrid Version: 2.9.5
Keywords: wxPropertyGrid, mousewheel, scroll Cc:
Blocked By: Blocking:
Patch: yes

Description

Way to reproduce:

  • compile and run the propgrid sample
  • make sure "Categorized mode" and "Standard items" buttons are pressed
  • expand "Cell Colour" choice control
  • move the mouse over the popup window and scrool up and down by mouse wheel; effect: the propgrid panel will be scrolled along with the popup

I have attached a patch that fixes this. A note: wxPropertyGridEditorEventForwarder always skips an event even if it was marked with Skip(false) which seems quite odd.

I could only reproduce on wxMSW (wxGTK is not affected). The fix though works correctly on both.

Attachments (1)

wx_mouse_wheel_propgrid.diff download (1.4 KB) - added by alexandrub 10 months ago.
Patch to fix mousewheel events not correctly processed by wxPGChoiceEditor in propertyGrid.

Download all attachments as: .zip

Change History (4)

Changed 10 months ago by alexandrub

Patch to fix mousewheel events not correctly processed by wxPGChoiceEditor in propertyGrid.

comment:1 Changed 10 months ago by vadz

  • Status changed from new to confirmed

I am not really sure what to do about this, the fix doesn't seem very appealing (explicitly checking for the dynamic type of the control just can't be the right thing to do as other controls may have popups too) but OTOH I don't really know how to fix it.

IMHO the real problem is the forwarding of the event in wxPropertyGridEditorEventForwarder in the first place. Does anybody know why do we have to do it?

comment:2 Changed 10 months ago by vadz

OK, I've found the real reason for the bug. Took me half an hour, too :-(

Will commit soon.

comment:3 Changed 10 months ago by VZ

  • Resolution set to fixed
  • Status changed from confirmed to closed

(In [74939]) Don't skip handled mouse wheel events in wxVScrolledWindow.

Make the code consistent with wxScrolledWindow and fix the problem with wheel
events always being skipped by wxVScrolledWindow which could result in
processing them multiple times, e.g. for the window itself and its parent as
it happened with wxPGChoiceEditor cells in wxPropertyGrid.

Closes #15547.

Note: See TracTickets for help on using tickets.