Fix focus issue with composite grid editor windows
The grid editor window can be composite, so check whether it or one of its children focus has focus when determining whether we should set the focus to the grid when the grid editor is being hidden, otherwise the focus was simply lost when such an editor was hidden. Closes https://github.com/wxWidgets/wxWidgets/pull/1599
This commit is contained in:
committed by
Vadim Zeitlin
parent
280f80fdfd
commit
dc99faa096
@@ -7088,7 +7088,7 @@ void wxGrid::HideCellEditControl()
|
|||||||
|
|
||||||
wxGridCellAttr *attr = GetCellAttr(row, col);
|
wxGridCellAttr *attr = GetCellAttr(row, col);
|
||||||
wxGridCellEditor *editor = attr->GetEditor(this, row, col);
|
wxGridCellEditor *editor = attr->GetEditor(this, row, col);
|
||||||
const bool editorHadFocus = editor->GetWindow()->HasFocus();
|
const bool editorHadFocus = editor->GetWindow()->IsDescendant(FindFocus());
|
||||||
|
|
||||||
if ( editor->GetWindow()->GetParent() != m_gridWin )
|
if ( editor->GetWindow()->GetParent() != m_gridWin )
|
||||||
editor->GetWindow()->Reparent(m_gridWin);
|
editor->GetWindow()->Reparent(m_gridWin);
|
||||||
|
Reference in New Issue
Block a user