Fix reentrancy in wxDataViewRendererBase::FinishEditing().
Switching focus to the main wxDataViewCtrl window resulted in focus loss event and a reentrant call to FinishEditing() itself if it wasn't called because the in-place edit control was being destroyed the first time. Fix this by destroying the in-place control first and adjusting the focus later, the effect should be exactly the same but now FinishEditing() can be safely called from anywhere in the code. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69896 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
4e4841b0ba
commit
4d7bc8e761
@ -760,10 +760,10 @@ bool wxDataViewRendererBase::FinishEditing()
|
||||
|
||||
wxDataViewCtrl* dv_ctrl = GetOwner()->GetOwner();
|
||||
|
||||
dv_ctrl->GetMainWindow()->SetFocus();
|
||||
|
||||
DestroyEditControl();
|
||||
|
||||
dv_ctrl->GetMainWindow()->SetFocus();
|
||||
|
||||
bool isValid = Validate(value);
|
||||
unsigned int col = GetOwner()->GetModelColumn();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user