DIALOG_USER_DEFINED_SIGNALS: workaround to solve an issue on Windows.
See: https://gitlab.com/kicad/code/kicad/-/issues/15837 This is not a fix, but a workaround to make this dialog usable on Windows. Without this workaround, it is barely possible to edit a user signal name. The root cause needs to be fixed. From master branch
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2024 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@@ -86,12 +86,19 @@ void DIALOG_USER_DEFINED_SIGNALS::addGridRow( const wxString& aText, int aId )
|
||||
m_grid->SetCellValue( row, 1, wxString::Format( wxS( "%d" ), aId ) );
|
||||
|
||||
wxGridCellAttr* attr = new wxGridCellAttr;
|
||||
#if defined( __WXMSW__ )
|
||||
// For some obscure reason, a GRID_CELL_STC_EDITOR does not work on MSW:
|
||||
// It has a strange behavior when entering data, making it unusable.
|
||||
// (see https://gitlab.com/kicad/code/kicad/-/issues/15837)
|
||||
// So use a GRID_CELL_TEXT_EDITOR.
|
||||
attr->SetEditor( new GRID_CELL_TEXT_EDITOR() );
|
||||
#else
|
||||
attr->SetEditor( new GRID_CELL_STC_EDITOR( true,
|
||||
[this]( wxStyledTextEvent& aEvent, SCINTILLA_TRICKS* aScintillaTricks )
|
||||
{
|
||||
onScintillaCharAdded( aEvent, aScintillaTricks );
|
||||
} ) );
|
||||
|
||||
#endif
|
||||
m_grid->SetAttr( row, 0, attr );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user