diff --git a/eeschema/symbol_editor/symbol_editor.cpp b/eeschema/symbol_editor/symbol_editor.cpp index 9b895062ce..e69ec5bebb 100644 --- a/eeschema/symbol_editor/symbol_editor.cpp +++ b/eeschema/symbol_editor/symbol_editor.cpp @@ -385,6 +385,8 @@ bool SYMBOL_EDIT_FRAME::LoadOneLibrarySymbolAux( LIB_SYMBOL* aEntry, const wxStr RebuildSymbolUnitsList(); SetShowDeMorgan( GetCurSymbol()->HasConversion() ); + ClearUndoRedoList(); + // Display the document information based on the entry selected just in // case the entry is an alias. UpdateMsgPanel(); diff --git a/eeschema/tools/symbol_editor_drawing_tools.cpp b/eeschema/tools/symbol_editor_drawing_tools.cpp index a1d136e05a..f6b1e1fba0 100644 --- a/eeschema/tools/symbol_editor_drawing_tools.cpp +++ b/eeschema/tools/symbol_editor_drawing_tools.cpp @@ -343,6 +343,9 @@ int SYMBOL_EDITOR_DRAWING_TOOLS::DrawShape( const TOOL_EVENT& aEvent ) } else if( evt->IsClick( BUT_LEFT ) && !item ) { + // Update in case the symbol was changed while the tool was running + symbol = m_frame->GetCurSymbol(); + if( !symbol ) continue; @@ -365,6 +368,12 @@ int SYMBOL_EDITOR_DRAWING_TOOLS::DrawShape( const TOOL_EVENT& aEvent ) else if( item && ( evt->IsClick( BUT_LEFT ) || evt->IsDblClick( BUT_LEFT ) || evt->IsAction( &EE_ACTIONS::finishDrawing ) ) ) { + if( symbol != m_frame->GetCurSymbol() ) + { + symbol = m_frame->GetCurSymbol(); + item->SetParent( symbol ); + } + if( evt->IsDblClick( BUT_LEFT ) || evt->IsAction( &EE_ACTIONS::finishDrawing ) || !item->ContinueEdit( wxPoint( cursorPos.x, -cursorPos.y ) ) ) {