From 1a330bb43e457d089847bd0f001197347d857e2b Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 27 Jun 2020 23:34:11 +0200 Subject: [PATCH] Remove apparently useless call to ShowCellEditControl() This code seems to have been there ever since da6af900f1 (Added drag-shrinking, 2000-02-04), but while it probably made sense back then, it lost its purpose a long time ago as the cell editor is now not only hidden, but also disabled when drag-resizing starts, so it doesn't make sense to attempt showing it back when the mouse button is released: it's never going to do anything (and didn't). Just remove this code, as hiding the editor while drag-resizing is not the behaviour we want from the UI point of view anyhow. And, again, removing it doesn't actually change anything in the current version of the code. --- src/generic/grid.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 675f6d2b75..99f2b4e2cc 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -4663,12 +4663,6 @@ wxGrid::DoGridCellLeftUp(wxMouseEvent& event, m_waitForSlowClick = false; } - else if ( m_selection && m_selection->IsSelection() ) - { - // Show the edit control, if it has been hidden for - // drag-shrinking. - ShowCellEditControl(); - } } else if ( m_cursorMode == WXGRID_CURSOR_RESIZE_ROW ) {