kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #14370
Re: Eeschema issue: cannot load component from multi libraries with same component name
On 08/18/2014 04:03 PM, Dick Hollenbeck wrote:
> On 08/18/2014 03:36 PM, Wayne Stambaugh wrote:
>> On 8/18/2014 4:30 PM, Mário Luzeiro wrote:
>>> I found that if I have multiple libraries with same component names (notable ex: R, C, INDUCTOR .. ) I cannot select another component other than the one already cached (?). I mean, if I select a R from another library it will load the same R as already loaded in the schematic.
>>> I am not sure if it is the same as before, or if it is displaying the first that found in the libraries.
>>> This should be a very recent issue, because I have old projects with multiple libraries with repeated names with no problem.
>>>
>>> Application: kicad
>>> Version: (2014-08-18 BZR 5081)-product Debug build
>>> wxWidgets: Version 3.0.1 (debug,wchar_t,compiler with C++ ABI 1002,GCC 4.8.2,wx containers,compatible with 2.8)
>>> Platform: Linux 3.13.0-32-generic x86_64, 64 bit, Little endian, wxGTK
>>> Boost version: 1.54.0
>>> USE_WX_GRAPHICS_CONTEXT=OFF
>>> USE_WX_OVERLAY=OFF
>>> KICAD_SCRIPTING=OFF
>>> KICAD_SCRIPTING_MODULES=OFF
>>> KICAD_SCRIPTING_WXPYTHON=OFF
>>> USE_FP_LIB_TABLE=HARD_CODED_ON
>>> BUILD_GITHUB_PLUGIN=ON
>>>
>>> Mario Luzeiro
>>
>> I just got bit by this too. I'm using r5081 as well so it must have
>> changed in one of the last few commits.
Wayne,
Take a look at PART_LIBS::LoadAllLibraries().
The only thing that changed that I am aware of is that the LibNames no longer may take
paths in the dialog UI. That was too much of a circus in my view, so I nuked that concept
in the UI. You now get a list of libraries and paths on where to find them.
The other thing that might be the cause of a problem is the sortOrder, although I thought
I had removed the need for that. It clearly is not being set.
Try the attached patch please.
I still don't get the need for the sortOrder even if this is a fix. I think we can remove
it, and I'd like to because it is a global.
Dick
=== modified file 'eeschema/class_library.cpp'
--- eeschema/class_library.cpp 2014-08-13 20:28:54 +0000
+++ eeschema/class_library.cpp 2014-08-18 21:16:09 +0000
@@ -1057,7 +1057,6 @@
wxFileName fn;
wxString filename;
wxString libs_not_found;
- wxArrayString sortOrder;
SEARCH_STACK* lib_search = aProject->SchSearchS();
#if defined(DEBUG) && 1
@@ -1147,6 +1146,9 @@
UTF8( libs_not_found ), 0, 0 );
}
+ wxArrayString sortOrder = lib_names;
+ sortOrder.Add( cache_name );
+
// Put the libraries in the correct order.
PART_LIBS::SetSortOrder( sortOrder );
References