Commit fbecc0d9 authored by jean-pierre charras's avatar jean-pierre charras

* fp_lib_table.cpp: fix an issue on Windows in ConvertFromLegacy: sometimes,...

* fp_lib_table.cpp: fix an issue on Windows in ConvertFromLegacy: sometimes, because the comparison was case sensitive, lib nicknames  were not found, although  libs exist ( for instance if a path was given like f:\mypath instead of F:\mypath)
* getpart.cpp: fix a potential bug on a translatable string with has requirements in spelling.
* fix bug  #1066179
* kicad: fix erroneous labels in sub menus.
parents 992cc5f1 19e4cb40
......@@ -799,10 +799,13 @@ bool FP_LIB_TABLE::ConvertFromLegacy( NETLIST& aNetList, const wxArrayString& aL
wxString uri = cur->rows[i].GetFullURI( true );
if( wxFileName::GetPathSeparator() == wxChar( '\\' )
&& uri.Find( wxChar( '/' ) ) >= 0 )
&& uri.Find( wxChar( '/' ) ) >= 0 )
uri.Replace( wxT( "/"), wxT( "\\" ) );
#ifdef __WINDOWS__
if( uri.CmpNoCase( libPath ) )
#else
if( uri == libPath )
#endif
{
libNickname = cur->rows[i].GetNickName();
break;
......@@ -827,7 +830,6 @@ bool FP_LIB_TABLE::ConvertFromLegacy( NETLIST& aNetList, const wxArrayString& aL
else
{
FPID newFPID = lastFPID;
newFPID.SetLibNickname( libNickname );
if( !newFPID.IsValid() )
......
......@@ -47,6 +47,7 @@ DIALOG_CHOOSE_COMPONENT::DIALOG_CHOOSE_COMPONENT( wxWindow* aParent, const wxStr
m_search_container->SetTree( m_libraryComponentTree );
m_searchBox->SetFocus();
m_componentDetails->SetEditable( false );
m_libraryComponentTree->ScrollTo( m_libraryComponentTree->GetFocusedItem() );
// The tree showing libs and component uses a fixed font,
// because we want controle the position of some info when drawing the
......
......@@ -135,7 +135,13 @@ wxString SCH_BASE_FRAME::SelectComponentFromLibrary( const wxString& aLibname,
{
// This is good for a transition for experineced users: giving them a History. Ideally,
// we actually make this part even faster to access with a popup on ALT-a or something.
search_container.AddAliasList( _("-- History --"), aHistoryList, NULL );
// the history is under a node named "-- History --"
// However, because it is translatable, and we need to have a node name starting by "-- "
// because we (later) sort all node names alphabetically and this node should be the first,
// we build it with only with "History" string translatable
wxString nodename;
nodename << wxT("-- ") << _("History") << wxT(" --");
search_container.AddAliasList( nodename, aHistoryList, NULL );
search_container.SetPreselectNode( aHistoryList[0], aHistoryLastUnit );
}
......
......@@ -59,11 +59,6 @@ void RotateListOfItems( PICKED_ITEMS_LIST& aItemsList, wxPoint& rotationPoint )
}
void DeleteItemsInList( EDA_DRAW_PANEL* panel, PICKED_ITEMS_LIST& aItemsList );
void DuplicateItemsInList( SCH_SCREEN* screen, PICKED_ITEMS_LIST& aItemsList,
const wxPoint aMoveVector );
void MirrorY( PICKED_ITEMS_LIST& aItemsList, wxPoint& aMirrorPoint )
{
for( unsigned ii = 0; ii < aItemsList.GetCount(); ii++ )
......
......@@ -416,6 +416,10 @@ void LIB_VIEW_FRAME::SetSelectedLibrary( const wxString& aLibraryName )
m_canvas->Refresh();
DisplayLibInfos();
ReCreateHToolbar();
// Ensure the corresponding line in m_libList is selected
// (which is not necessary the case if SetSelectedLibrary is called
// by an other caller than ClickOnLibList.
m_libList->SetStringSelection( m_libraryName, true );
}
......@@ -435,6 +439,10 @@ void LIB_VIEW_FRAME::SetSelectedComponent( const wxString& aComponentName )
if( m_entryName.CmpNoCase( aComponentName ) != 0 )
{
m_entryName = aComponentName;
// Ensure the corresponding line in m_cmpList is selected
// (which is not necessary the case if SetSelectedComponent is called
// by an other caller than ClickOnCmpList.
m_cmpList->SetStringSelection( aComponentName, true );
DisplayLibInfos();
m_unit = 1;
m_convert = 1;
......
......@@ -193,14 +193,14 @@ void KICAD_MANAGER_FRAME::ReCreateMenuBar()
// Text editor
AddMenuItem( browseMenu,
ID_TO_EDITOR,
_( "Open Text E&ditor" ),
_( "Launch Text E&ditor" ),
_( "Launch preferred text editor" ),
KiBitmap( editor_xpm ) );
// View file
AddMenuItem( browseMenu,
ID_BROWSE_AN_SELECT_FILE,
_( "&Open Local File" ),
_( "&Edit Local File" ),
_( "Edit local file" ),
KiBitmap( browse_files_xpm ) );
......
......@@ -121,6 +121,8 @@ void PCB_BASE_FRAME::Import_Pad_Settings( D_PAD* aPad, bool aDraw )
m_canvas->RefreshDrawingRect( aPad->GetBoundingBox() );
aPad->GetParent()->SetLastEditTime();
OnModify();
}
/** Compute the 'next' pad number for autoincrement
......@@ -132,8 +134,8 @@ static wxString GetNextPadName( wxString aPadName )
int ponder = 1;
// Trim and extract the trailing numeric part
while( aPadName.Len()
&& aPadName.Last() >= '0'
while( aPadName.Len()
&& aPadName.Last() >= '0'
&& aPadName.Last() <= '9' )
{
num += ( aPadName.Last() - '0' ) * ponder;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment