diff --git a/common/clipboard.cpp b/common/clipboard.cpp index 4d89563c4e..dadd3d9023 100644 --- a/common/clipboard.cpp +++ b/common/clipboard.cpp @@ -275,9 +275,7 @@ bool GetTabularDataFromClipboard( std::vector>& aData ) wxTextDataObject data; if( wxTheClipboard->GetData( data ) ) - { ok = AutoDecodeCSV( data.GetText(), aData ); - } } // We could also handle .csv wxDF_FILENAMEs here diff --git a/eeschema/dialogs/dialog_lib_edit_pin_table.cpp b/eeschema/dialogs/dialog_lib_edit_pin_table.cpp index bba934a597..c319a57af5 100644 --- a/eeschema/dialogs/dialog_lib_edit_pin_table.cpp +++ b/eeschema/dialogs/dialog_lib_edit_pin_table.cpp @@ -956,6 +956,7 @@ public: if( aFromFile ) { path = promptForFile(); + if( path.IsEmpty() ) return {}; } @@ -988,7 +989,7 @@ public: { std::vector& cols = csvData[i]; - auto pin = std::make_unique( &aSym ); + std::unique_ptr pin = std::make_unique( &aSym ); // Ignore cells that stick out to the right of the headers size_t maxCol = std::min( headerCols.size(), cols.size() ); @@ -1005,6 +1006,7 @@ public: pins.emplace_back( std::move( pin ) ); } } + return pins; } @@ -1548,7 +1550,7 @@ void DIALOG_LIB_EDIT_PIN_TABLE::OnImportButtonClick( wxCommandEvent& event ) m_pins.clear(); } - for( auto& newPin : newPins ) + for( std::unique_ptr& newPin : newPins ) m_pins.push_back( newPin.release() ); m_cbGroup->SetValue( false );