Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use DataGridViewCellMouseEventArgs.RowIndex #8200

Merged
merged 1 commit into from Jun 9, 2020

Conversation

mstv
Copy link
Member

@mstv mstv commented Jun 8, 2020

Fixes part of #8195, which broke the right click / context menu

Proposed changes

In case of DataGridViewCellMouseEvent, the base class MouseEventArgs.Location contains the mouse position relative to the selected cell not to the Control.
And it already contains the RowIndex.
So use it instead of HitTest(e.X, e.Y).

Test methodology

  • manual (more complete this time, sorry)

Test environment(s)

  • Git Extensions 33.33.33
  • Build d60ed22
  • Git 2.26.0.windows.1
  • Microsoft Windows NT 6.2.9200.0
  • .NET Framework 4.8.4180.0
  • DPI 96dpi (no scaling)

✒️ I contribute this code under The Developer Certificate of Origin.

instead of HitTest(e.X, e.Y)
@mstv mstv self-assigned this Jun 8, 2020
Copy link
Member

@gerhardol gerhardol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Untested

@codecov
Copy link

codecov bot commented Jun 9, 2020

Codecov Report

Merging #8200 into master will increase coverage by 0.03%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #8200      +/-   ##
==========================================
+ Coverage   49.51%   49.54%   +0.03%     
==========================================
  Files         852      852              
  Lines       61292    61290       -2     
  Branches    11016    11016              
==========================================
+ Hits        30348    30369      +21     
+ Misses      28670    28662       -8     
+ Partials     2274     2259      -15     
Flag Coverage Δ
#production 37.32% <0.00%> (+0.03%) ⬆️
#tests 94.88% <ø> (+0.05%) ⬆️

@RussKie RussKie merged commit 1a7543d into gitextensions:master Jun 9, 2020
@ghost ghost added this to the 4.0 milestone Jun 9, 2020
@mstv mstv deleted the fix/mouse_click_position branch June 9, 2020 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants