DIALOG_SPICE_MODEL: fix incorrect readonly setting of m_libraryContents.

This wxStyledTextCtrl was set to readonly before writing its contents,
so nothing was shown, at least on wxWidgets 3.1.4.
This commit is contained in:
jean-pierre charras 2020-08-24 17:24:48 +02:00
parent 1d1a5afe0c
commit fd4fb61acc
1 changed files with 3 additions and 2 deletions

View File

@ -182,8 +182,6 @@ void DIALOG_SPICE_MODEL::Init()
m_pwlTimeCol = m_pwlValList->AppendColumn( "Time [s]", wxLIST_FORMAT_LEFT, 100 );
m_pwlValueCol = m_pwlValList->AppendColumn( "Value [V/A]", wxLIST_FORMAT_LEFT, 100 );
m_libraryContents->SetReadOnly( true );
m_sdbSizerOK->SetDefault();
// Hide pages that aren't fully implemented yet
@ -815,6 +813,8 @@ void DIALOG_SPICE_MODEL::loadLibrary( const wxString& aFilePath )
// Display the library contents
wxWindowUpdateLocker updateLock( this );
m_libraryContents->SetReadOnly( false );
m_libraryContents->Clear();
wxTextFile file;
file.Open( filePath.GetFullPath() );
@ -876,6 +876,7 @@ void DIALOG_SPICE_MODEL::loadLibrary( const wxString& aFilePath )
// display the full library content:
m_libraryContents->AppendText( fullText );
m_libraryContents->SetReadOnly( true );
wxArrayString modelsList;