Remove apparently unnecessary wxGrid::m_inOnKeyDown

Although this variable, and a check for it in OnKeyDown(), was present
since the first version of this code added back in f85afd4e46 (Added new
wxGrid classes[...], 1999-10-06), there doesn't seem to be any
indication that it has ever been needed, so remove it to simplify the
code and make it possible to add early returns to this function easily.

No real changes yet.
This commit is contained in:
Vadim Zeitlin
2020-06-28 22:53:10 +02:00
parent a5f172bacb
commit 3747169660
2 changed files with 0 additions and 13 deletions

View File

@@ -2520,7 +2520,6 @@ protected:
wxGridCellAttr* m_defaultCellAttr;
bool m_inOnKeyDown;
int m_batchCount;

View File

@@ -2887,7 +2887,6 @@ void wxGrid::Init()
m_editable = true; // default for whole grid
m_inOnKeyDown = false;
m_batchCount = 0;
m_extraWidth =
@@ -5639,15 +5638,6 @@ void wxGrid::OnDPIChanged(wxDPIChangedEvent& event)
void wxGrid::OnKeyDown( wxKeyEvent& event )
{
if ( m_inOnKeyDown )
{
// shouldn't be here - we are going round in circles...
//
wxFAIL_MSG( wxT("wxGrid::OnKeyDown called while already active") );
}
m_inOnKeyDown = true;
// propagate the event up and see if it gets processed
wxWindow *parent = GetParent();
wxKeyEvent keyEvt( event );
@@ -5954,8 +5944,6 @@ void wxGrid::OnKeyDown( wxKeyEvent& event )
break;
}
}
m_inOnKeyDown = false;
}
void wxGrid::OnKeyUp( wxKeyEvent& WXUNUSED(event) )