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 ...@@ -799,10 +799,13 @@ bool FP_LIB_TABLE::ConvertFromLegacy( NETLIST& aNetList, const wxArrayString& aL
wxString uri = cur->rows[i].GetFullURI( true ); wxString uri = cur->rows[i].GetFullURI( true );
if( wxFileName::GetPathSeparator() == wxChar( '\\' ) if( wxFileName::GetPathSeparator() == wxChar( '\\' )
&& uri.Find( wxChar( '/' ) ) >= 0 ) && uri.Find( wxChar( '/' ) ) >= 0 )
uri.Replace( wxT( "/"), wxT( "\\" ) ); uri.Replace( wxT( "/"), wxT( "\\" ) );
#ifdef __WINDOWS__
if( uri.CmpNoCase( libPath ) )
#else
if( uri == libPath ) if( uri == libPath )
#endif
{ {
libNickname = cur->rows[i].GetNickName(); libNickname = cur->rows[i].GetNickName();
break; break;
...@@ -827,7 +830,6 @@ bool FP_LIB_TABLE::ConvertFromLegacy( NETLIST& aNetList, const wxArrayString& aL ...@@ -827,7 +830,6 @@ bool FP_LIB_TABLE::ConvertFromLegacy( NETLIST& aNetList, const wxArrayString& aL
else else
{ {
FPID newFPID = lastFPID; FPID newFPID = lastFPID;
newFPID.SetLibNickname( libNickname ); newFPID.SetLibNickname( libNickname );
if( !newFPID.IsValid() ) if( !newFPID.IsValid() )
......
...@@ -47,6 +47,7 @@ DIALOG_CHOOSE_COMPONENT::DIALOG_CHOOSE_COMPONENT( wxWindow* aParent, const wxStr ...@@ -47,6 +47,7 @@ DIALOG_CHOOSE_COMPONENT::DIALOG_CHOOSE_COMPONENT( wxWindow* aParent, const wxStr
m_search_container->SetTree( m_libraryComponentTree ); m_search_container->SetTree( m_libraryComponentTree );
m_searchBox->SetFocus(); m_searchBox->SetFocus();
m_componentDetails->SetEditable( false ); m_componentDetails->SetEditable( false );
m_libraryComponentTree->ScrollTo( m_libraryComponentTree->GetFocusedItem() );
// The tree showing libs and component uses a fixed font, // The tree showing libs and component uses a fixed font,
// because we want controle the position of some info when drawing the // because we want controle the position of some info when drawing the
......
...@@ -135,7 +135,13 @@ wxString SCH_BASE_FRAME::SelectComponentFromLibrary( const wxString& aLibname, ...@@ -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, // 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. // 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 ); search_container.SetPreselectNode( aHistoryList[0], aHistoryLastUnit );
} }
......
...@@ -59,11 +59,6 @@ void RotateListOfItems( PICKED_ITEMS_LIST& aItemsList, wxPoint& rotationPoint ) ...@@ -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 ) void MirrorY( PICKED_ITEMS_LIST& aItemsList, wxPoint& aMirrorPoint )
{ {
for( unsigned ii = 0; ii < aItemsList.GetCount(); ii++ ) for( unsigned ii = 0; ii < aItemsList.GetCount(); ii++ )
......
...@@ -416,6 +416,10 @@ void LIB_VIEW_FRAME::SetSelectedLibrary( const wxString& aLibraryName ) ...@@ -416,6 +416,10 @@ void LIB_VIEW_FRAME::SetSelectedLibrary( const wxString& aLibraryName )
m_canvas->Refresh(); m_canvas->Refresh();
DisplayLibInfos(); DisplayLibInfos();
ReCreateHToolbar(); 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 ) ...@@ -435,6 +439,10 @@ void LIB_VIEW_FRAME::SetSelectedComponent( const wxString& aComponentName )
if( m_entryName.CmpNoCase( aComponentName ) != 0 ) if( m_entryName.CmpNoCase( aComponentName ) != 0 )
{ {
m_entryName = aComponentName; 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(); DisplayLibInfos();
m_unit = 1; m_unit = 1;
m_convert = 1; m_convert = 1;
......
...@@ -193,14 +193,14 @@ void KICAD_MANAGER_FRAME::ReCreateMenuBar() ...@@ -193,14 +193,14 @@ void KICAD_MANAGER_FRAME::ReCreateMenuBar()
// Text editor // Text editor
AddMenuItem( browseMenu, AddMenuItem( browseMenu,
ID_TO_EDITOR, ID_TO_EDITOR,
_( "Open Text E&ditor" ), _( "Launch Text E&ditor" ),
_( "Launch preferred text editor" ), _( "Launch preferred text editor" ),
KiBitmap( editor_xpm ) ); KiBitmap( editor_xpm ) );
// View file // View file
AddMenuItem( browseMenu, AddMenuItem( browseMenu,
ID_BROWSE_AN_SELECT_FILE, ID_BROWSE_AN_SELECT_FILE,
_( "&Open Local File" ), _( "&Edit Local File" ),
_( "Edit local file" ), _( "Edit local file" ),
KiBitmap( browse_files_xpm ) ); KiBitmap( browse_files_xpm ) );
......
...@@ -121,6 +121,8 @@ void PCB_BASE_FRAME::Import_Pad_Settings( D_PAD* aPad, bool aDraw ) ...@@ -121,6 +121,8 @@ void PCB_BASE_FRAME::Import_Pad_Settings( D_PAD* aPad, bool aDraw )
m_canvas->RefreshDrawingRect( aPad->GetBoundingBox() ); m_canvas->RefreshDrawingRect( aPad->GetBoundingBox() );
aPad->GetParent()->SetLastEditTime(); aPad->GetParent()->SetLastEditTime();
OnModify();
} }
/** Compute the 'next' pad number for autoincrement /** Compute the 'next' pad number for autoincrement
...@@ -132,8 +134,8 @@ static wxString GetNextPadName( wxString aPadName ) ...@@ -132,8 +134,8 @@ static wxString GetNextPadName( wxString aPadName )
int ponder = 1; int ponder = 1;
// Trim and extract the trailing numeric part // Trim and extract the trailing numeric part
while( aPadName.Len() while( aPadName.Len()
&& aPadName.Last() >= '0' && aPadName.Last() >= '0'
&& aPadName.Last() <= '9' ) && aPadName.Last() <= '9' )
{ {
num += ( aPadName.Last() - '0' ) * ponder; 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