Add helper wxGrid::GetCurrentCellEditorPtr() and use it
No real changes, just simplify the code by using a single function to retrieve the editor to use for the current cell. This also allows to get rid of a few temporary variables, further amplifying the simplification.
This commit is contained in:
@@ -2897,6 +2897,17 @@ private:
|
||||
void SetNativeHeaderColCount();
|
||||
void SetNativeHeaderColOrder();
|
||||
|
||||
// Return the editor which should be used for the current cell.
|
||||
wxGridCellEditorPtr GetCurrentCellEditorPtr() const
|
||||
{
|
||||
return GetCellAttrPtr(m_currentCellCoords)->GetEditorPtr
|
||||
(
|
||||
this,
|
||||
m_currentCellCoords.GetRow(),
|
||||
m_currentCellCoords.GetCol()
|
||||
);
|
||||
}
|
||||
|
||||
// Unlike the public SaveEditControlValue(), this method doesn't check if
|
||||
// the edit control is shown, but just supposes that it is.
|
||||
void DoSaveEditControlValue();
|
||||
|
Reference in New Issue
Block a user