Don't call wxSafeYield() from wxGenericListCtrl::EditLabel().
This could result in wxYield() reentrancy and while it could be avoided by using wxSafeYield(NULL, true /* only if needed */) it seems that we don't actually need to yield here at all and a simple Update() should be enough. Closes #14727. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72754 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2238,19 +2238,10 @@ wxTextCtrl *wxListMainWindow::EditLabel(long item, wxClassInfo* textControlClass
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// We have to call this here because the label in question might just have
|
|
||||||
// been added and no screen update taken place.
|
|
||||||
if ( m_dirty )
|
if ( m_dirty )
|
||||||
{
|
{
|
||||||
// TODO: use wxTheApp->SafeYieldFor(NULL, wxEVT_CATEGORY_UI) instead
|
// Ensure the display is updated before we start editing.
|
||||||
// so that no pending events may change the item count (see below)
|
Update();
|
||||||
// IMPORTANT: needs to be tested!
|
|
||||||
wxSafeYield();
|
|
||||||
|
|
||||||
// Pending events dispatched by wxSafeYield might have changed the item
|
|
||||||
// count
|
|
||||||
if ( (size_t)item >= GetItemCount() )
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wxTextCtrl * const text = (wxTextCtrl *)textControlClass->CreateObject();
|
wxTextCtrl * const text = (wxTextCtrl *)textControlClass->CreateObject();
|
||||||
|
Reference in New Issue
Block a user