This commit brings several changes:
- Add a footprint preview pane to the eeschema component selector
- Upgrade component list to wxTreeListCtrl
- Factor out wxTreeListCtrl subclass TWO_COLUMN_TREE_LIST which
patches a column size bug
- Linkify datasheet URL in info pane
wxNO_BORDER and wxSW_3D seem incompatible and the border flickers
when the tree frame gets resized. Using KICAD_DEFAULT_DRAWFRAME_STYLE
avoids this.
Signed-off-by: Clemens Koller <cko@embeon.de>
When Eeschema is relaunched from KiCad, the symbol libraries were always
reloaded which isn't necessary as they are maintained by the kiface project
object until the project is changed.
Fix minor title capitalization in symbol library progress dialog.
A conversion from wxString using FROM_UTF8() was inadvertently used when
loading and enumerating symbols from the legacy plugin. This conversion
would break any non-ascii characters in the symbol name.
Fixes lp:1664642
https://bugs.launchpad.net/kicad/+bug/1664642
Check to see if the root symbol alias already exists before adding it to
the symbol library alias list in the legacy schematic I/O plugin. There
currently about six different ways that the root alias can be changed in
the root symbol which causes issues. This really needs to be cleaned up.
Use buffering when updating a symbol in a library to prevent the library
file from being written before it is backed up.
Update the alias and unit selection menubar drop down lists.
Delete the output formatter so the file is closed so that reading the
file time stamp can be performed to prevent unnecessary cache reloads.
Fixes lp:1664834
https://bugs.launchpad.net/kicad/+bug/1664834
Apparently symbol definition blocks can have a '0' character in the lock
position which is typically defined as 'L' or 'F'. This must have been
a oversight at some point since both versions of the DEF parameters
exist in library version 2.3 files.
Disable the symbol library cache buffering after saving.
This patch fixes a problem with GAL where zones are ignored in ratsnest
calculation.
The problem is that calling RN_DATA::Update on a zone with no polygons
(an unfilled zone) will remove the zone successfully, but then
RN_DATA::Add is a no-op.
From this point on, because ::Update refuses to work on items that have
not been ::Add'ed, the zone is removed entirely from ratsnest
calculation and will only be reconsidered once it is explicitly ::Add'ed
again.
The fix is to explicitly create an empty RN_ZONE_DATA object for every
zone that is ::Add'ed.
A second problem is that the point editor forgot to call
RN_DATA::Recalculate after calling Fill_Zone.
Fixes: lp:1537120
* https://bugs.launchpad.net/kicad/+bug/1537120
When attempting to read a pcad file exported from Altium, kicad was
segfaulting because it was trying to access an empty array. This patch
fixes that.
The reason the array was empty was the the board outline in the pcad
file was composed of only arcs and the plugin only processes lines in
the board outline. Adding this functionality is for another patch I
suppose.
Signed-off-by: Clemens Koller <cko@embeon.de>
Check for existence of cache library when before attempting to rebuild
the cache. Create a new cache library object if no cache library was
loaded.
Add missing buffering and cache properties to LIB_PART::FindAlias() to
prevent the plugin from reloading the cache library that may not exist.
Add method to find library by full path and file name.
Revert the check for a symbol in the cache library remove from last
patch.
Add checks for plugin cache file name validity and existence of a the
file before attempting to verify the file modification time to prevent
wxWidgets from raising an assertion in debug builds.
Clear modified flag when saving buffered and/or cached library.
There is no need to use mm_malloc at this moment. Explanation:
1) It was planned that there was advantadge to use aligned memory but it
was not measured the performance. 2) aligned memory is needed for use
with SIMD (i.e: SSE) but that is not used at moment.
Fixes: lp:1626278
https://bugs.launchpad.net/kicad/+bug/1626278
Add the ability to save empty symbol library file for caching and empty
schematic.
Remove check for existing symbol in cache populating routine. Just perform
a complete rebuild of the cache library and overwrite the existing one.
Fixes lp:1663871
https://bugs.launchpad.net/kicad/+bug/1663871
Move adding LIB_PART to library until the part is fully parse. The problem
was unique_ptr was cleaning up the part when an exception was thrown during
parsing causing a double free when the cache was deleted.
Add missing try/catch block when loading the cache library during an append
schematic operation.
Fixes lp:1663869
https://bugs.launchpad.net/kicad/+bug/1663869
LIB_ID was changing the symbol name due to the parser dropping everything
past the first '/' character which is interpreted by LIB_ID as the item
version. Add flag to ignore this in LIB_ID::SetLibItemName() and add a
new ctor so the library nickname, item name, and revision can be set as
required to prevent the standard LIB_ID parsing.
Fix a few places where PART_LIBS functions FindLibraryAlias() and
FindLibPar() were translating wxString symbol names to LIB_IDs where the
LIB_ID parser was truncating the symbol name.
Modifies the selection menu to be adaptive and disable selection options
that are not possible.
Adds a new selection option that is only available when selecting
modules, this tool will select all footprints on the same sheet level or
belonging to subsheets. It will also search for nets that are only
connecting between modules on the same sheet or lower and select every
segment and via belonging to it.
This action launches the normal interactive zone tool, but re-uses the
settings from an existing zone, based on a flag passed to the main zone
function.
Break a chunk of the new zone tool out into a separate function to keep
the code clear. When zone cutouts and similar zone tools are added,
they'll get the settings from existing zones.
This commit now used std::unique_ptr for the temporary zone item, which
simplifies handling of the ownership of that item.
This commit wires up the as-yet-unused "remove alternate" tool action
and uses it to select copper connections (normally 'U') before deleting
segments.
THis also reverses the sense of Delete and Backspace (Delete used to be
'remove' and Backpace was 'remove alt', now it is reversed). This means
that backspace is the key that removes a segment and Delete removes the
track. This is the same as legacy behaviour. Other delete actions are,
for now, the same between Delete and Backspace.
Fixes: lp:1517213
* https://bugs.launchpad.net/kicad/+bug/1517213
The previous behaviour was to act on only the first item in the
selection. The new behaviour is to act on every eligible item (in this
case, tracks and vias).
Provide a visual feedback to the user how each rotation
will affect the routing by immediately reflecting the
change in ratsnest orientation.
Signed-off-by: Aurabindo J <mail@aurabindo.in>
Fixes: lp:1663488
* https://bugs.launchpad.net/kicad/+bug/1663488
The attached patch fixes a minor bug where opening the 'View' menu
will sometimes revert the canvas to the default canvas. The problem is
that wxMenuItem::Check will cause a menu event when the status is changed even
if the checkmark is being *unset*. The workaround is to only call Check with
a true argument. This works because the menu items are radio buttons.
Use LIB_ID instead of wxString for storing the library symbol information
in the schematic symbol in preparation for the upcoming symbol library table
implementation.
Change the FindLibAlias and FindLibPart functions in the PART_LIBS object
instead of wxString. Please note that only the library ID name is used to
search the list of libraries. The library nickname is ignored. Once the
symbol library table is implemented and full LIB_IDs are defined, the
library search code will no longer be used and will only be kept to load
older schematics that have not been converted.
Move SCH_LEGACY_PLUGIN_CACHE definition so that the legacy plugin knows
how to properly delete the cache object.
The LIB_PART object stores a pointer to the PART_LIB that it belongs to.
Now that the PART_LIB is no long responsible for loading the library, add
the PART_LIB pointer after the library is loaded by the plugin.
Don't call init() when performing library functions as it was always
setting the m_cache variable to null which cause the library to be
reloaded every time a library command was performed as well as a
memory leak.
Delete cache object when the plugin is destroyed.
Add SCH_PLUGIN object to PART_LIB object.
Convert all PART_LIB I/O to use SCH_PLUGIN.
Remove library caching from PART_LIB and use caching provided by SCH_PLUGIN.
Add support to use PROPERTIES for buffering and document file write control
instead of adding code the SCH_PLUGIN object in the SCH_LEGACY_PLUGIN that
will not be required when the new file formats are implemented.
Add buffering to SCH_LEGACY_PLUGIN to prevent cache from writing file on
every change to library. This is to prevent the cache library from being
written every time a new symbol is added.
Add option to not save library document file when saving library. This is
primarily used by the cache library write code.
Move symbol library write code out of LIB_PART and into SCH_LEGACY_PLUGIN.
Add exception handling where LIB_PART caught the exception and returned
an error status.
Remove KICAD_SCH_IO_MANAGER build option as it is no longer optional.
The bitmaps/*.xpm files can be edited as regular pictures
(i.e. using GIMP), so, bitmaps/sources/color_code/* don't need to be
kept as well.
Fixes: lp:1005383
Signed-off-by: Clemens Koller <cko@embeon.de>
This makes "rotate" into two separate TOOL_EVENTs, which each have a
"multiplier" parameter.
Also added is a namespace for 'free functions' that use TOOL_EVENT
public interfaces (perhaps with other inputs too) to centralise some
decision-making and calculations.
Fixes: lp:1660731
* https://bugs.launchpad.net/kicad/+bug/1660731