From acf1d62045a52c82862efedf64ac59ea3f40bb73 Mon Sep 17 00:00:00 2001 From: Alexander Boehm Date: Tue, 26 Aug 2025 17:56:06 +0200 Subject: [PATCH] grid_tricks: fix multi-cell cut/delete This fixes cutting / deleting the content of multiple cells, if they are not read only, in GRID_TRICKS based tables. It works for the most important text based wxGridCellEditor types. --- common/grid_tricks.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/common/grid_tricks.cpp b/common/grid_tricks.cpp index 8da752cb6e..f464b9ee98 100644 --- a/common/grid_tricks.cpp +++ b/common/grid_tricks.cpp @@ -30,7 +30,8 @@ #include #include #include - +#include +#include // It works for table data on clipboard for an Excel spreadsheet, // why not us too for now. @@ -95,8 +96,11 @@ void GRID_TRICKS::init() bool GRID_TRICKS::isTextEntry( int aRow, int aCol ) { wxGridCellEditor* editor = m_grid->GetCellEditor( aRow, aCol ); - bool retval = ( dynamic_cast( editor ) - || dynamic_cast( editor ) ); + bool retval = ( dynamic_cast( editor ) + || dynamic_cast( editor ) + || dynamic_cast( editor ) + || dynamic_cast( editor ) + || dynamic_cast( editor ) ); editor->DecRef(); return retval;