Handle clicks on grid edges normally when not using drag-resizing
Clicking on (or near) the grid column or row edges was handled specially to allow dragging them in order to resize the column or row, but this doesn't need to be done if drag-resizing the columns or rows is not allowed in the first place and resulted in surprising user-visible behaviour: e.g. when using row selection, clicking mostly anywhere in the row selected it, except if the click happened to be between the two columns, in which case it didn't. Fix this and always select the row in such scenario now. Unfortunately, doing this required adding yet more CanDragXXX() functions in addition to the already impressive panoply of them in wxGrid, but we need CanDragGridColEdges() as none of the existing functions checked for m_useNativeHeader (there was instead an ad hoc check for it directly in the mouse handling code) and the row version had to be added for symmetry.
This commit is contained in:
@@ -4322,6 +4322,26 @@ public:
|
||||
*/
|
||||
bool CanDragColSize(int col) const;
|
||||
|
||||
/**
|
||||
Return @true if column edges inside the grid can be dragged to resize
|
||||
the rows.
|
||||
|
||||
@see CanDragGridSize(), CanDragColSize()
|
||||
|
||||
@since 3.1.4
|
||||
*/
|
||||
bool CanDragGridColEdges() const;
|
||||
|
||||
/**
|
||||
Return @true if row edges inside the grid can be dragged to resize the
|
||||
rows.
|
||||
|
||||
@see CanDragGridSize(), CanDragRowSize()
|
||||
|
||||
@since 3.1.4
|
||||
*/
|
||||
bool CanDragGridRowEdges() const;
|
||||
|
||||
/**
|
||||
Return @true if the dragging of grid lines to resize rows and columns
|
||||
is enabled or @false otherwise.
|
||||
|
Reference in New Issue
Block a user