diff --git a/eeschema/lib_text.cpp b/eeschema/lib_text.cpp index 6985a260ce..4b33f4d1ce 100644 --- a/eeschema/lib_text.cpp +++ b/eeschema/lib_text.cpp @@ -41,7 +41,8 @@ LIB_TEXT::LIB_TEXT( LIB_SYMBOL* aParent ) : LIB_ITEM( LIB_TEXT_T, aParent ), EDA_TEXT( schIUScale, wxEmptyString ) { - SetTextSize( wxSize( schIUScale.MilsToIU( DEFAULT_TEXT_SIZE ), schIUScale.MilsToIU( DEFAULT_TEXT_SIZE ) ) ); + SetTextSize( wxSize( schIUScale.MilsToIU( DEFAULT_TEXT_SIZE ), + schIUScale.MilsToIU( DEFAULT_TEXT_SIZE ) ) ); } diff --git a/eeschema/symbol_editor/symbol_edit_frame.cpp b/eeschema/symbol_editor/symbol_edit_frame.cpp index 79eca3f529..52c84471b7 100644 --- a/eeschema/symbol_editor/symbol_edit_frame.cpp +++ b/eeschema/symbol_editor/symbol_edit_frame.cpp @@ -1428,6 +1428,12 @@ void SYMBOL_EDIT_FRAME::LoadSymbolFromSchematic( SCH_SYMBOL* aSymbol ) m_unit = std::max( 1, aSymbol->GetUnit() ); m_convert = std::max( 1, aSymbol->GetConvert() ); + // Optimize default edit options for this symbol + // Usually if units are locked, graphic items are specific to each unit + // and if units are interchangeable, graphic items are common to units + SYMBOL_EDITOR_DRAWING_TOOLS* tools = GetToolManager()->GetTool(); + tools->SetDrawSpecificUnit( symbol->UnitsLocked() ); + // The buffered screen for the symbol SCH_SCREEN* tmpScreen = new SCH_SCREEN(); diff --git a/eeschema/tools/symbol_editor_drawing_tools.cpp b/eeschema/tools/symbol_editor_drawing_tools.cpp index 9a2619a705..9151113b58 100644 --- a/eeschema/tools/symbol_editor_drawing_tools.cpp +++ b/eeschema/tools/symbol_editor_drawing_tools.cpp @@ -215,6 +215,12 @@ int SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace( const TOOL_EVENT& aEvent ) { LIB_TEXT* text = new LIB_TEXT( symbol ); + if( m_drawSpecificUnit ) + text->SetUnit( m_frame->GetUnit() ); + + if( m_drawSpecificConvert ) + text->SetConvert( m_frame->GetConvert() ); + text->SetPosition( VECTOR2I( cursorPos.x, -cursorPos.y ) ); text->SetTextSize( wxSize( schIUScale.MilsToIU( settings->m_Defaults.text_size ), schIUScale.MilsToIU( settings->m_Defaults.text_size ) ) );