This adds a user-settable control for the grid line thickness on GAL
canvases to the display options dialog.
The thickness settings now comes in, along with other GAL display
settings, as part of GAL_DISPLAY_OPTIONS observer functionality. To this
end, the setter in GAL interface is removed, as an external user should
be setting this parameter via the GAL_DISPLAY_OPTIONS interface.
Fixes: lp:1662482
* https://bugs.launchpad.net/kicad/+bug/1662482
This class, INCREMENTAL_TEXT_CTRL, is used to provide a frameworks for
classes that want to control a text control that can be incremented
according to some scheme.
Also provided is a wxWidgets implementation with spin buttons for
control, as well as mousewheel support.
The mappings from enums to control settings can be done in static
functions, which makes the set/retreive functions more concise, and also
puts the mapping functions in a clearly delineated place.
This puts the graphical/display options with the other similar options
in that dialog, rather than with the dimension options found in the Set
Grid dialog, which is in the Dimensions menu.
Also place the option itself in the GAL Display Options structure, so it
can be updated using the observer mechanism there.
The setter for the style in the GAL interface is removed, as the public
interface for setting this option is now to modify the
GAL_DISPLAY_OPTIONS structure and notify the GAL when done.
The GAL_DISPLAY_OPTIONS member of EDA_DRAW_FRAME is a private member and
is used in only a couple of places in the class. The real use of this
member is by a by-ref interface, GetGalDisplayOptions.
Because te GAL options are used by a very select few users of
EDA_DRAW_FRAME, it makes little sense to force all the (many) files
including draw_frame.h to also include gal_display_options.h, when the
vast majority have no need for it.
This massively speeds up compilation of the project when
gal_display_options.h is changed.
More isolation could be acheived by separating the GAL config types (eg
OpenGL antialias modes and grid style) from the options header, as,
although the GAL class uses them, not many includers of the GAL header
need the options struct as well.
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.