diff --git a/eeschema/dialogs/dialog_sim_model.cpp b/eeschema/dialogs/dialog_sim_model.cpp index f73cc5cf33..2bdfa2bf67 100644 --- a/eeschema/dialogs/dialog_sim_model.cpp +++ b/eeschema/dialogs/dialog_sim_model.cpp @@ -31,7 +31,6 @@ #include #include -using TYPE = SIM_VALUE::TYPE; using CATEGORY = SIM_MODEL::PARAM::CATEGORY; @@ -51,7 +50,6 @@ DIALOG_SIM_MODEL::DIALOG_SIM_MODEL( wxWindow* aParent, SCH_SYMBOL& aSymbol, m_wasCodePreviewUpdated( true ) { m_modelNameCombobox->SetValidator( m_modelNameValidator ); - auto validator = dynamic_cast( m_modelNameCombobox->GetValidator() ); m_browseButton->SetBitmap( KiBitmap( BITMAPS::small_folder ) ); for( SIM_MODEL::TYPE type : SIM_MODEL::TYPE_ITERATOR() ) @@ -59,7 +57,7 @@ DIALOG_SIM_MODEL::DIALOG_SIM_MODEL( wxWindow* aParent, SCH_SYMBOL& aSymbol, m_models.push_back( SIM_MODEL::Create( type, m_symbol.GetAllPins().size() ) ); SIM_MODEL::DEVICE_TYPE_ deviceType = SIM_MODEL::TypeInfo( type ).deviceType; - + if( !m_curModelTypeOfDeviceType.count( deviceType ) ) m_curModelTypeOfDeviceType[deviceType] = type; } @@ -70,7 +68,6 @@ DIALOG_SIM_MODEL::DIALOG_SIM_MODEL( wxWindow* aParent, SCH_SYMBOL& aSymbol, for( SIM_MODEL::DEVICE_TYPE_ deviceType : SIM_MODEL::DEVICE_TYPE__ITERATOR() ) m_deviceTypeChoice->Append( SIM_MODEL::DeviceTypeInfo( deviceType ).description ); - m_scintillaTricks = std::make_unique( m_codePreview, wxT( "{}" ), false ); m_paramGridMgr->Bind( wxEVT_PG_SELECTED, &DIALOG_SIM_MODEL::onParamGridSelectionChange, this ); @@ -353,7 +350,7 @@ void DIALOG_SIM_MODEL::updatePinAssignmentsTab() continue; wxString modelPinString = getModelPinString( i + 1 ); - wxArrayString choices; + wxArrayString choices; m_pinAssignmentsGrid->SetCellValue( static_cast( symbolPinNumber - 1 ), static_cast( PIN_COLUMN::MODEL ), @@ -979,7 +976,7 @@ void DIALOG_SIM_MODEL::onParamGridSelectionChange( wxPropertyGridEvent& aEven m_prevParamGridSelection = grid->GetSelection(); return; } - + // Without this the user had to press tab before they could edit the field. editorControl->SetFocus(); m_prevParamGridSelection = grid->GetSelection(); diff --git a/kicad/project_template.cpp b/kicad/project_template.cpp index efda25eb5c..bf951fcddb 100644 --- a/kicad/project_template.cpp +++ b/kicad/project_template.cpp @@ -79,7 +79,7 @@ public: m_exclude( exclude ) { } - virtual wxDirTraverseResult OnFile( const wxString& filename ) + virtual wxDirTraverseResult OnFile( const wxString& filename ) override { if( !filename.StartsWith( m_exclude ) ) m_files.emplace_back( wxFileName( filename ) ); @@ -87,7 +87,7 @@ public: return wxDIR_CONTINUE; } - virtual wxDirTraverseResult OnDir( const wxString& dirname ) + virtual wxDirTraverseResult OnDir( const wxString& dirname ) override { if( !dirname.StartsWith( m_exclude ) ) m_files.emplace_back( wxFileName::DirName( dirname ) );