From 5498f96bfe1cc9813c53e60e6c1c5e47f8a6e44a Mon Sep 17 00:00:00 2001 From: Stefan Neis Date: Tue, 18 Apr 2000 15:14:53 +0000 Subject: [PATCH] Renamed IsCellEditControlDisplayed() to IsCellEditControlShown(). Replaces some more IsCellEditControlEnabled() by IsCellEditControlShown(). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7210 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/generic/grid.h | 2 +- src/generic/grid.cpp | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/wx/generic/grid.h b/include/wx/generic/grid.h index d349fd9d78..b05e82a44b 100644 --- a/include/wx/generic/grid.h +++ b/include/wx/generic/grid.h @@ -1068,7 +1068,7 @@ public: void DisableCellEditControl() { EnableCellEditControl(FALSE); } bool CanEnableCellControl() const; bool IsCellEditControlEnabled() const; - bool IsCellEditControlDisplayed() const; + bool IsCellEditControlShown() const; bool IsCurrentCellReadOnly() const; diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 6d8bad37e8..104f685066 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -4399,7 +4399,7 @@ void wxGrid::ProcessGridCellMouseEvent( wxMouseEvent& event ) { // Hide the edit control, so it // won't interfer with drag-shrinking. - if ( IsCellEditControlEnabled() ) + if ( IsCellEditControlShown() ) { HideCellEditControl(); SaveEditControlValue(); @@ -5453,7 +5453,8 @@ void wxGrid::DrawCell( wxDC& dc, const wxGridCellCoords& coords ) rect.height = GetRowHeight(row) - 1; // if the editor is shown, we should use it and not the renderer - if ( isCurrent && IsCellEditControlEnabled() ) + // Note: However, only if it is really _shown_, i.e. not hidden! + if ( isCurrent && IsCellEditControlShown() ) { wxGridCellEditor *editor = attr->GetEditor(this, row, col); editor->PaintBackground(rect, attr); @@ -5547,7 +5548,7 @@ void wxGrid::DrawHighlight(wxDC& dc) m_currentCellCoords.Set(0, 0); } - if ( IsCellEditControlEnabled() ) + if ( IsCellEditControlShown() ) { // don't show highlight when the edit control is shown return; @@ -5945,7 +5946,7 @@ bool wxGrid::IsCellEditControlEnabled() const return m_cellEditCtrlEnabled ? !IsCurrentCellReadOnly() : FALSE; } -bool wxGrid::IsCellEditControlDisplayed() const +bool wxGrid::IsCellEditControlShown() const { if (m_cellEditCtrlEnabled) { @@ -7710,7 +7711,7 @@ void wxGrid::SetCellValue( int row, int col, const wxString& s ) if ( m_currentCellCoords.GetRow() == row && m_currentCellCoords.GetCol() == col && - IsCellEditControlDisplayed()) + IsCellEditControlShown()) // Note: If we are using IsCellEditControlEnabled, // this interacts badly with calling SetCellValue from // an EVT_GRID_CELL_CHANGE handler.