Fix clicking on activatable toggle column in generic wxDataViewCtrl.
Call PrepareForItem() after calling GetLineStart() as the latter calls PrepareForItem() for other items internally, undoing the effects of the first call. Closes #16132. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76212 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -650,6 +650,7 @@ wxMSW:
|
||||
- Disable the use of new style wxDirDialog under Vista to work around a bug in
|
||||
its implementation under this system (jtrauntvein).
|
||||
- Fix wxExecute() keeping open too many thread handles for too long (dannchr).
|
||||
- Fix clicking on togglable columns in wxDataViewCtrl (Laurent Poujoulat).
|
||||
- Fix expander in non left-most position in wxDataViewCtrl (Laurent Poujoulat).
|
||||
|
||||
wxOSX:
|
||||
|
@@ -4398,13 +4398,17 @@ void wxDataViewMainWindow::OnMouse( wxMouseEvent &event )
|
||||
if ( IsCellEditableInMode(item, col, wxDATAVIEW_CELL_ACTIVATABLE) )
|
||||
{
|
||||
// notify cell about click
|
||||
cell->PrepareForItem(model, item, col->GetModelColumn());
|
||||
|
||||
wxRect cell_rect( xpos + itemOffset,
|
||||
GetLineStart( current ),
|
||||
col->GetWidth() - itemOffset,
|
||||
GetLineHeight( current ) );
|
||||
|
||||
// Note that PrepareForItem() should be called after GetLineStart()
|
||||
// call in cell_rect initialization above as GetLineStart() calls
|
||||
// PrepareForItem() for other items from inside it.
|
||||
cell->PrepareForItem(model, item, col->GetModelColumn());
|
||||
|
||||
// Report position relative to the cell's custom area, i.e.
|
||||
// not the entire space as given by the control but the one
|
||||
// used by the renderer after calculation of alignment etc.
|
||||
|
Reference in New Issue
Block a user