Opened 7 years ago

Closed 6 years ago

#4212 closed defect (fixed)

Mouse right button in wxGrid

Reported by: deafwolf Owned by:
Priority: normal Milestone:
Component: wxGrid Version:
Keywords: wxGrid Cc: deafwolf
Blocked By: Blocking:
Patch: no

Description

Run a grid demo, the top left cell will be focus, make a motion of mouse right button on other cell, this will select a block of cells,then left click on any cell, the result is strange.

Run a grid demo, the mouse right button can't resize the cell or column, resize the cell will show extra grid line.

Change History (4)

comment:1 Changed 7 years ago by wojdyr

  • Keywords wxGrid added
  • Status changed from new to confirmed

I can confirm both issues (svn-trunk). The strange result I can see is that the left click deselects only A1 cell - the rest of the selected range is still selected.

comment:2 Changed 7 years ago by neis

Fixed first issue in both branches (r54238 and r54237), there was a missing screen update for the rectangle that becomes newly unselected.

For the second issue, there's an inconsistency with respect to button handling, resizing by dragging the border of a row or column label explicitly checks for left button and does not work with any other button, for dragging a cell border this explicit test for the left button is missing (so it reacts to dragging using _any_ button), but then, it will only react to a button up event for the left button, so if you used a different one, the temporary line just stays on the screen. Not sure what is acutally the desired behaviour here: Should any button work or only the left one?

comment:3 Changed 7 years ago by wxsite

  • Component changed from GUI-generic to wxGrid

comment:4 Changed 6 years ago by neis

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

As of r54395 (and r54397 for stable branch), right (or middle) button won't start cell resizing any more, which gets rid of the extra grid lines. IMO, it's desired behaviour that the resizing works only with the left button, but if others think it should work with any button this could be implemented as well.

Note: See TracTickets for help on using tickets.