A better solution to keep SPICE netlist from being entirely selected.

Fixes https://gitlab.com/kicad/code/kicad/issues/14177
This commit is contained in:
Jeff Young 2023-03-06 18:45:23 +00:00
parent 65c9988d45
commit 98d7b14dbc
2 changed files with 4 additions and 2 deletions

View File

@ -339,7 +339,7 @@ static void selectAllInTextCtrls( wxWindowList& children )
{
// Respect an existing selection
}
else
else if( childTextCtrl->IsEditable() )
{
childTextCtrl->SelectAll();
}
@ -353,7 +353,7 @@ static void selectAllInTextCtrls( wxWindowList& children )
{
// Respect an existing selection
}
else if( !scintilla->GetText().Contains( wxT( "\n") ) )
else if( scintilla->IsEditable() )
{
scintilla->SelectAll();
}

View File

@ -375,6 +375,8 @@ public:
textCtrl->SetLexer( wxSTC_LEX_SPICE );
textCtrl->SetEditable( false );
wxBoxSizer* sizer = new wxBoxSizer( wxVERTICAL );
sizer->Add( textCtrl, 1, wxEXPAND | wxALL, 5 );
SetSizer( sizer );