diff --git a/eeschema/component_tree_search_container.cpp b/eeschema/component_tree_search_container.cpp index 015397349d..11f6bad27a 100644 --- a/eeschema/component_tree_search_container.cpp +++ b/eeschema/component_tree_search_container.cpp @@ -141,8 +141,6 @@ void COMPONENT_TREE_SEARCH_CONTAINER::AddAliasList( const wxString& aNodeName, const wxArrayString& aAliasNameList, CMP_LIBRARY* aOptionalLib ) { - static const wxChar unitLetter[] = wxT( "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ); - TREE_NODE* const lib_node = new TREE_NODE( TREE_NODE::TYPE_LIB, NULL, NULL, aNodeName, wxEmptyString, wxEmptyString ); nodes.push_back( lib_node ); @@ -168,8 +166,16 @@ void COMPONENT_TREE_SEARCH_CONTAINER::AddAliasList( const wxString& aNodeName, if( !a->GetDescription().empty() ) { // Preformatting. Unfortunately, the tree widget doesn't have columns - display_info.Printf( wxT(" %s[ %s ]"), - ( a->GetName().length() <= 8 ) ? wxT("\t\t") : wxT("\t"), + // and using tabs does not work very well or does not work at all + // (depending on OS versions). + #define COLUMN_DESCR_POS 24 + int len = a->GetName().length(); + display_info.Clear(); + + if( len <= COLUMN_DESCR_POS ) + display_info.Append( ' ', COLUMN_DESCR_POS - len ); + + display_info += wxString::Format( wxT( " [ %s ]" ), GetChars( a->GetDescription() ) ); } @@ -178,15 +184,20 @@ void COMPONENT_TREE_SEARCH_CONTAINER::AddAliasList( const wxString& aNodeName, nodes.push_back( alias_node ); if( a->GetComponent()->IsMulti() ) // Add all units as sub-nodes. - for ( int u = 0; u < a->GetComponent()->GetPartCount(); ++u ) + { + wxString unitName; + + for( int u = 1; u <= a->GetComponent()->GetPartCount(); ++u ) { - const wxString unitName = unitLetter[u]; - TREE_NODE* unit_node = new TREE_NODE(TREE_NODE::TYPE_UNIT, alias_node, a, - _("Unit ") + unitName, - wxEmptyString, wxEmptyString ); - unit_node->Unit = u + 1; + unitName = LIB_COMPONENT::ReturnSubReference( u, false ); + TREE_NODE* unit_node = new TREE_NODE( TREE_NODE::TYPE_UNIT, + alias_node, a, + _("Unit") + wxT( " " ) + unitName, + wxEmptyString, wxEmptyString ); + unit_node->Unit = u; nodes.push_back( unit_node ); } + } } } diff --git a/eeschema/dialogs/dialog_choose_component.cpp b/eeschema/dialogs/dialog_choose_component.cpp index 1039acf1f6..9a65fc42f5 100644 --- a/eeschema/dialogs/dialog_choose_component.cpp +++ b/eeschema/dialogs/dialog_choose_component.cpp @@ -47,6 +47,13 @@ DIALOG_CHOOSE_COMPONENT::DIALOG_CHOOSE_COMPONENT( wxWindow* aParent, const wxStr m_search_container->SetTree( m_libraryComponentTree ); m_searchBox->SetFocus(); m_componentDetails->SetEditable( false ); + + // The tree showing libs and component uses a fixed font, + // because we want controle the position of some info when drawing the + // tree. Using tabs does not work very well (does not work on Windows) + wxFont font = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT ); + m_libraryComponentTree->SetFont( wxFont( font.GetPointSize(), + wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL ) ); } diff --git a/eeschema/menubar.cpp b/eeschema/menubar.cpp index 412d8b27d0..852206c902 100644 --- a/eeschema/menubar.cpp +++ b/eeschema/menubar.cpp @@ -399,8 +399,8 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() // Library AddMenuItem( preferencesMenu, ID_CONFIG_REQ, - _( "Set &Library Path" ), - _( "Set library preferences" ), + _( "Set Active &Libraries" ), + _( "Set active library list and library paths" ), KiBitmap( library_xpm ) ); // Colors diff --git a/eeschema/sch_component.cpp b/eeschema/sch_component.cpp index d83c892591..3575075845 100644 --- a/eeschema/sch_component.cpp +++ b/eeschema/sch_component.cpp @@ -764,14 +764,14 @@ void SCH_COMPONENT::SetOrientation( int aOrientation ) m_transform.x2 = m_transform.y1 = 0; break; - case CMP_ROTATE_CLOCKWISE: // Rotate + (incremental rotation) + case CMP_ROTATE_COUNTERCLOCKWISE: // Rotate + (incremental rotation) temp.x1 = temp.y2 = 0; temp.y1 = 1; temp.x2 = -1; transform = true; break; - case CMP_ROTATE_COUNTERCLOCKWISE: // Rotate - (incremental rotation) + case CMP_ROTATE_CLOCKWISE: // Rotate - (incremental rotation) temp.x1 = temp.y2 = 0; temp.y1 = -1; temp.x2 = 1; @@ -1534,8 +1534,7 @@ void SCH_COMPONENT::Rotate( wxPoint aPosition ) RotatePoint( &m_Pos, aPosition, 900 ); - //SetOrientation( CMP_ROTATE_COUNTERCLOCKWISE ); - SetOrientation( CMP_ROTATE_CLOCKWISE ); + SetOrientation( CMP_ROTATE_COUNTERCLOCKWISE ); for( int ii = 0; ii < GetFieldCount(); ii++ ) {