File tree Expand file tree Collapse file tree 1 file changed +1
-7
lines changed
src/System.Windows.Forms/System/Windows/Forms/Controls/ToolStrips Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change @@ -848,20 +848,14 @@ protected override void OnMouseWheel(MouseEventArgs e)
848
848
{
849
849
base . OnMouseWheel ( e ) ;
850
850
851
- if ( e . Delta == 0 || Items . Count == 0 )
851
+ if ( e . Delta == 0 || Items . Count == 0 || ! RequiresScrollButtons )
852
852
{
853
853
return ;
854
854
}
855
855
856
856
Rectangle firstItemBounds = Items [ 0 ] . Bounds ;
857
857
Rectangle lastItemBounds = Items [ Items . Count - 1 ] . Bounds ;
858
858
859
- if ( firstItemBounds . Top == DisplayRectangle . Top &&
860
- lastItemBounds . Bottom == DisplayRectangle . Bottom )
861
- {
862
- return ;
863
- }
864
-
865
859
int delta = firstItemBounds . Height * SystemInformation . MouseWheelScrollLines * - Math . Sign ( e . Delta ) ;
866
860
867
861
if ( delta < 0 )
You can’t perform that action at this time.
0 commit comments