Fix some issues with hotkey paste in WX_GRIDs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16253
This commit is contained in:
parent
04246a969c
commit
95cfddf3a6
|
@ -28,6 +28,7 @@
|
|||
#include <wx/tokenzr.h>
|
||||
#include <wx/clipbrd.h>
|
||||
#include <wx/log.h>
|
||||
#include <wx/stc/stc.h>
|
||||
#include <widgets/grid_readonly_text_helpers.h>
|
||||
|
||||
|
||||
|
@ -492,7 +493,13 @@ void GRID_TRICKS::onCharHook( wxKeyEvent& ev )
|
|||
stripped.Replace( ROW_SEP, " " );
|
||||
stripped.Replace( ROW_SEP_R, " " );
|
||||
stripped.Replace( COL_SEP, " " );
|
||||
paste_text( stripped );
|
||||
|
||||
// Write to the CellEditControl if we can
|
||||
if( wxTextEntry* te = dynamic_cast<wxTextEntry*>( ev.GetEventObject() ) )
|
||||
te->WriteText( stripped );
|
||||
else
|
||||
paste_text( stripped );
|
||||
|
||||
handled = true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue