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
Automatically switch to a drawing layer, if a copper layer was
preselected. No annoying message boxes.
Do not deactivate the tool on layer switch.
Replaced setting updatePreview with direct calls to VIEW::update
Line width is kept in m_lineWidth for all shapes.
Arc centres don't land in the bounding box when the arc angle is small.
Currently, there are added to the BB, which leads to surprising
selection beheviour of arc segments (the BB can be much larger than
expected).
This commit omits the arc centre from the calculation.
Fixes: lp:1492734
* https://bugs.launchpad.net/kicad/+bug/1492734
Import becomes apply and export becomes copy.
The term "push" to apply settings globally has not been renamed.
Swap the order of the copy and apply in the context menu.
Perviously, the generic snapping code would choose the nearest of the
module origin and origin of each module pad when selecting a module
using the "Find module" tool (T hotkey).
This is unlikely to be expected unless the cursor is already near the
correct pad or the module centre.
New behaviour is to pick up by module origin first, then
select the module. This means that the cursor is already nearest the
main module origin anchor, so that is what will be used.
Fixes: lp:1571214
* https://bugs.launchpad.net/kicad/+bug/1571214
If a line has zero thickness, use the outline thickness to draw it.
This avoids having invisible items on the PCB that could still end up in
outputs, or "losing" an item by setting thickness to 0.
This only affects GAL drawing routines, the PCB data structures are not
affected, so any outputs will be the same.
Fixes: lp:1501749
* https://bugs.launchpad.net/kicad/+bug/1501749
- Move Select All buttons, after discussion in IRC found that numerous
users are unclear on exactly what those buttons would do. The <<< in
them was an attempt to associate them with a listbox, but in reality
created an association in the user's mind with the above "move" actions.
- Spacing, punctuation adjustments
- Reused SelectComponent dialog
- Reduced selection to current library only
- Ability to filter component for deletion
- Automatically pre-select the current component