Dotted, dashed and dash-dot lines are provided in
HPGL, PDF, PS and SVG plot outputs along with line
width and color formatting.
DXF format does not currently provide any dashed
line functionality
A bug in HPGL plotted is corrected. Previous HPGL
dashed line commands were incorrect, plotting all
lines as solid.
The GTK+ file dialog is case sensitive however it does support regular
expressions. Most of the file dialog wildcards are lower case so only
files with the lower case extensions will show up in the file dialog.
This code adds a method to convert file extensions of any case to the
appropriate (sch -> [sS][cC][hH]) regular expression on GTK+ builds so
all file extension case combinations will show up in the file dialog.
A note to developers: make sure to add a file extension when setting
when setting the default file argument. If you do don't set an
extension, the GTK+ file dialog will happily append the regular
expression as the file extension which is surely not what you want.
There are still a few known places (mostly gerbview) where there are
some complex wildcard code that has not been converted.
Fixes lp:1720542
https://bugs.launchpad.net/kicad/+bug/1720542
The replaced wxASSERTs notify the developer that a variable is a
null pointer, but continue code execution and lead to a crash.
Instead, they are changed to wxCHECKs, that give the same type
of notification, but return from a function before the crash
happens.
A copy and paste error was causing to footprint library table file name
and path to be shown in the symbol library table edit dialog. Factor
out code in PROJECT::FootprintLibTblName() to PROJECT::libTableName()
to handle both symbol and footprint library table names and create a
new PROJECT::SymbolLibTableName() method to fix the path and file name
in the symbol library table edit dialog.
In the rare case when something goes wrong with the symbol library
table remapping, do not attempt to rescue symbols that are neither
in the cache nor in any of the libraries.
The legacy rescue library code overwrote the existing library so
previous rescues would get lost. If the rescue library exists,
copy it's contents into the new rescue library before adding the
new rescued symbols so no previously rescued symbols are lost.
Fix a null pointer bug in the symbol library editor when no symbol
is loaded.
Set LIB_ID item name to name passed to LIB_PART ctor.
Copy LIB_ID in LIB_PART copy ctor.
If a library disappears all together or a symbol name is changed, force
the rescuer to add it to the rescue library. The current rescue code
only looked for differences if they existed between libraries. This was
causing symbols to be unceremoniously dumped from the symbol library
table remapping.
Don't search for cache rescue candidates in the symbol library table
rescuer.
The old symbol library list save/load code does not get called in the
schematic project file configuration code. Use the LibNamesAndPaths
static function from the PART_LIBS object.
Bump schematic file version from 3 to 4 which represents the switch to
the library table symbol linking which is incompatible with all previous
versions.
Refresh the schematic after running remapping dialog manually.
Add missing CMP_TREE_NODE_LIB_ID type that was inadvertently deleted by
the symbol library table implementation that broke the preselected symbol
tree expansion and highlighting.
Changed CMP_TREE_NODE_LIB_ID type from ALIAS to LIBID for more accurate
description.
Use LIB_ID in COMPONENT_SELECTION object instead of strings of the
library and symbol names.
Move FindAlias() inside a try/catch block as is can throw an exception.
Don't abort adding symbols to library when a symbol cannot be found in
the symbol library table or the cache library. Instead, queue up error
messages and display them after attempting to add all of the symbols.
Always save the library file even if some of the symbols could not be
archived.
Catch IO_ERRORs in SCH_COMPONENT resolve to prevent unhandled exceptions
further up the stack.
Remove all symbol libraries from the project file after remapping to
prevent symbols that should be loaded from the cache being loaded from
a library further up the search order. Save the project file to clear
all of the libraries so they never get reloaded again.
Remove the symbol library management dialog and menu entries.
Rename the symbol library table dialog menu entry.
Remove all symbol libraries from default project file to prevent clashes
with the cache library.
Fix illegal symbol naming in Eagle plugin.
Refactor rescue objects so that they can support derivation.
Factor out legacy rescuer code to perform legacy project rescues.
Create new symbol library table rescuer for rescuing symbol library table
based projects.
Perform the correct rescue type on project load.
Add symbol library table remapping support to the tools menu for run on
demand as applicable.
Add flag to SCH_SCREENS::UpdateSymbolLinks() to allow forcing the symbol
link updates when the library modification hash has not changed.
Simplify some of the library editing code. There have been a few minor
changes in the behavior of the editor. If the current symbol is deleted
from the library, the next symbol in the library is not loaded. The
deleted symbol is cleared and the current symbol is empty.
Change component to symbol to align with the preferred terminology
discussed on the developer's mailing list.
Add separate update UI event for save library as to enable the menu entry
whenever a library is selected.
Change the select symbol list dialog to a single column using the LIB_ID
format LIB_NICKNAME:LIB_ITEM_NAME so that the selection can be parsed by
LIB_ID.
Add method to expand URI to LIB_TABLE_BASE.
Override wxApp::OnExceptionInMainLoop() in debug builds to make debugging
easier when an unhandled exception occurs in a wxUpdateUIEvent handler.
Change SCH_SCREENS::HasNoFullyDefinedLibIds() to return false when the
schematic has no symbols to prevent the remapping dialog from being run.
Use SCH_COMPONENT part reference when creating netlist rather than looking
up the library symbol.
Change all of the component tree helper objects to use LIB_IDs instead of
LIB_ALIAS pointers. LIB_ALIAS pointers are dangerous to use because they
can be deleted in the symbol library editor while the component chooser
dialog has copies of them. With LIB_IDs, the LIB_ALIAS pointer is found
on demand and can be guaranteed to be valid.
Update the chooser dialog to load the symbol library table instead of the
libraries defined in the project file and return a LIB_ID instead of a
LIB_ALIAS pointer.
Modify SCH_BASE_FRAME::SelectComponentFromLibrary() to handle the LIB_IDs
returned from the component chooser dialog.
Use GetPath() instead of GetFullPath() when initializing environment
variable table entries KICAD_SYMBOL_DIR and KICAD_PTEMPALTE due to
unexpected trailing path separator which was causing find libraries
by URI to fail.
Don't create a project symbol library table when there are no libraries
not found in the global symbol library table.
Don't add non-existent libraries to project symbol library table.
Clear symbol library table when loading a new schematic.
Minor remapping status message improvements.
Remove all instances of PART_LIBS and replace them with SYMBOL_LIB_TABLE
except for the CMP_TREE_MODEL_ADAPTER which requires updating as well.
Return the selected symbol using the LIB_NICKNAME:SYMBOL_NAME format when
viewer is launched as modal.
Add code to SYMBOL_LIB_TABLE object to allow enumerating symbol library
power symbols only.
Add a non-const version of LIB_TABLE::findRow().
Remove redundant information from Doxygen comments.
Check the if the schematic being loaded has been remapped (no symbol
library table nicknames defined) and remap accordingly.
Fix issues when resolving the library symbol links in the schematic
symbols.
Add cache library fallback when resolving symbols that cannot be
remapped.
Add remap complete message to remap dialog.
Add HasLibrary() helper to LIB_TABLE_BASE.
Fix issues when loading library symbols using symbol library table.
Add hashing function to symbol library table.
Improve the symbol panel message to warn user when cache library is
used to resolve symbol.
In LIB_EDIT_FRAME::GetComponentFrom{Undo,Redo}List() methods, the
PICKED_ITEMS_LIST object which was retrieved from undo/redo list has not
been destroyed.
Rewritten SCH_SCREEN::ClearUndoORRedoList() to be easier to read.
Minor whitespace formatting.
KiCad library symbol text objects cannot contain carriage returns and/or
line feeds which isn't the case with Eagle symbol libraries. Otherwise,
the library file will be corrupt when it is saved. Fixing this in the
legacy plugin would break the current file format so just replace them
with underscores. Ideally these text objects should be broken into
multiple text objects but the current plugin design doesn't support
this.
Remove adding the power symbol library when no libraries are specified
in the project file to prevent unexpected missing library dialog.
Only show progress dialog if there are actually libraries to load.
Do not call wxWindow::Destroy(). The dialog is created on the stack and
will be destroyed properly in the wxWindow dtor.
Fixes lp:1728648
https://bugs.launchpad.net/kicad/+bug/1728648
- set a proper title for the dialog
- changed the library parser delimiters to all whitespaces
- sorts the model list in the alphabetical order
- one tab to select subcircuit and semiconductor models
- model type is automatically selected
This instead of using the library alias property. But to not break any
library. When adding new components to the schematic, copy the value
from the library into the Field variable only if the field variable would
otherwise be empty.
This way, the context menu for showing the docs is more understandable
for users, and is also changeable from the schematic without having to
modify the actual libraries.
Fixed: lp:1723104
- Also makes the project and file import functions filetype dependent.
- The change from IO_MGR::KICAD to IO_MGR::KICAD_SEXP removes a conflict from a compile definition for KICAD when compiling kicad/import_project.cpp
- !! Eeschema uses Eagle plugin for loading schematics (i.e. it does not
use KiCad format anymore)
- Fixed build errors
- Fixed a few crashes
- Code formatting
(On windows, xsltproc.exe does not accept '\' in output filename, only '/' like on Unix, so this separator is converted when possible)
Minor code cleanup
This fixes potential DRC false positive bugs that occur when inner layers
are removed from the board but the actual objects on contained on those
layers remain in the board.
Since Pcbnew does not handle odd number layers, this is not a perfect fix.
When the user chooses the front or back layer only options from the layer
setup dialog, objects on the copper layers will not be removed. This will
not cause the false positive issue described above.
Get rid of dialog OK and cancel button event handlers and use the proper
TranferData(To/From)Window for handling control data.
Add PCB_LAYER_COLLECTOR for collecting board objects by layer. Factor out
redundant [] operators into base PCB_COLLECTOR object.
Fixes lp:893950
https://bugs.launchpad.net/kicad/+bug/893950
Don't prompt the user to save the project file after the schematic plot
settings change. It is not done this way anywhere else in KiCad.
Fixes lp:1478131
https://bugs.launchpad.net/kicad/+bug/1478131
Add EDA_DRAW_FRAME::isBusy() method to test if the current item is being
edited or a block operation is in progress.
Ignore undo and redo commands when editor is busy.
Fixes lp:1718656
https://bugs.launchpad.net/kicad/+bug/1718656
Make all trace environment variable strings upper case and prefix with
KICAD_TRACE_ for consistency.
Add Doxygen group for the trace environment variable strings.
Derive the dialog from DIALOG_SHIM and show dialog quasi-modally to prevent
other KiCad main frame window events from being blocked.
Remove redundant storing of parent window pointer.
Verify parent window pointer is actually a SCH_EDIT_FRAME since the dialog
directly accesses parent object methods.
Replace static event table with dynamic event handling.
Fixes lp:1718241
https://bugs.launchpad.net/kicad/+bug/1718241
This fixes a build error on MSVC. The code may actually be legal, but a
proof of that would require a lengthy dissertation on argument promotion
rules for the ternary operator, and the simplest rule of promoting both
cases to a wxString rvalue is not likely to be what is intended here.
Fortunately, this expression can be simplified.
- pad names are stored as wxString instead of a char[4] & integer union
- removed pad name to string conversion functions
- fixed pad & pin properties dialog restrictions regarding the name
length
Test the result of wxFileName::MakeRelativeTo() before testing to see if
the resulting relative path starts with '.'. When a library with relative
path that contains a path name with $ as the first character,
MakeRelativeTo() calls Normalize() which attempts to do an environment
variable substitution that concatenates consecutive paths i.e. the path
/foo/$bar ends up being foo$bar which is obviously incorrect. This fix
is only a fix for absolute paths and files that contain path names that
begin with $. This still does not resolve the issue when adding a
library file relative to one of the search paths that contains a path
name that begins with a $. Fixing this would potentially break paths
that are expecting environment variable substitution.
Fixes lp:1712361
https://bugs.launchpad.net/kicad/+bug/1712361
Use sheet pin direction to calculate sheet minimum height and width.
Remove sheet pin offsetting as the new sheet height and width calculation
prevents invalid minimums.
Calculate the proper minimum height when resizing sheets to prevent resized
sheet height from always increasing.
Prevent the sheet pins from being drawn in the corners of the sheet when
updating the edge constraints on resize. This ensures that the sheet pin
is always drawn within the bounds of the sheet. Please note that this fix
may not be 100% accurate as is assumes the default grid size of 50 mils.
This may not be what the user expected but it guarantees that wires will
connect to the pin properly.
Fixes lp:1699796
https://bugs.launchpad.net/kicad/+bug/1699796
This was the behavior before the factoring out of COMPONENT_TREE. Moving
the history at the top just required inserting it at the right point;
fixing preselect involved wxEVT_INIT_DIALOG not propagating to the
panel. Simple solution was to move the parts of that event handler to
the constructor as they didn't have to be in an event handler anyway.
Fixes: lp:1707538
* https://bugs.launchpad.net/kicad/+bug/1707538
Instead of keeping all items in a boost::ptr_vector(), LIB_ITEMs are now
stored in an integer (KICAD_T) to LIB_ITEMS map.
The map allows to quickly access a subset of items of given type.
As the items are stored per type, there is no need to call
LIB_ITEMS::sort() to assure the correct drawing order. As a result,
libraries load faster.
To retain the old interface, there is a LIB_ITEMS_LIST wrapper for
the map, allowing the developers to access the items as if it was a flat
list-like structure.
Create a new dialog to edit global and project specific symbol library
tables.
Add menu entries for new symbol library table editor in schematic editor
and symbol library editor main frame menus.
Add command event handler for symbol library table editor dialog to
SCH_BASE_FRAME so it is accessible from derived frames.
Fix bug in default environment variables initialization. A test for
existing user defined environment variables was preventing any new
default environment variables added to the list from being initialized.
Create a dialog to give the user options to configure the global symbol
library table the first time Eeschema is run when no global symbol library
table exists.
Add information when dummy symbol is used for library symbols that could
not be found to give the user some useful information to help track down
the broken link rather than display an empty message panel.
This forces the compiler class specific features rather than borrowing
from the base class's std::string. In some cases prior to this,
wxString( std::string ) was being called rather than UTF8::operator
wxString() leading to garbled wxStrings.
Added function UTF8::wx_str() which is of great convenience also.
Implicit conversions still work as before, and hopefully more reliably.
This commit was too broad and not cognizant of the purpose of the class
UTF8.
Add MAYBE_VERIFY_UTF8() macro, which can trap non-UTF8 encoded strings in
debug builds.
Use that macro conditionally in class UTF8 to trap non-UTF8 encoded strings
being put into UTF8 instances.
Due to library list repopulation on refresh, the unit was being
overwritten with 1. Now, we track whether the unit needs to be
overwritten.
Fixes: lp:1677736
* https://bugs.launchpad.net/kicad/+bug/1677736
The illegal white space testing for reference and value (library editor
only) fields are adequate to ensure the user cannot enter invalid white
space characters. Leading and/or trailing white space should not be an
issue for field storage in the schematic file as they are quoted. Rather
than silently removing the leading and/or trailing white space which is
frowned upon, let the user fix it.
Fixes lp:1659526
https://bugs.launchpad.net/kicad/+bug/1659526
Fix potential memory leak in both footprint and symbol library table
parsers when a duplicate library nickname entry exists.
Parse entire symbol library table before raising duplicate nickname
exception.
Improve the duplicate library table nickname error message to make
life easier for users to fix broken tables.
This is more a workaround than a fix.
The crash was due to the fact the library cache is modified on the disk with the saving process.
Fixes: lp:1702707
https://bugs.launchpad.net/kicad/+bug/1702707
The previous fix was building the full name incorrectly, when this name contains a path not relative to the project.
Fixes: lp:1700331
https://bugs.launchpad.net/kicad/+bug/1700331
Initializing wxFileName objects by using string assignment or the single
string argument ctor will cause wxFileName to parse everything to the
right of the first dot as the file extension. Therefore, file names such
as foo.1.lib and bar.baz.lib will fail. This is probably not the only
place in the KiCad source where this can occur.
Fixes lp:1700331
https://bugs.launchpad.net/kicad/+bug/1700331
Add Resolve() and ResolveAll() methods the SCH_COMPONENT object to use the
symbol library table to obtain links to the library symbols.
Add LoadAlias() method to SYMBOL_LIB_TABLE to find an alias by it's LIB_ID.
Clean up Doxygen comments to match coding policy changes.
The zoom window toolbar button is on the right toolbar separated from the
other zoom buttons on the top toolbar. Move the zoom window button to the
top toolbar beside the other zoom buttons.
Before the refactor library browser display Bezier curves correctly only
once, at other times they were just straight lines or crashed the
application.
The symbol library header was setting the text thickness using the
last line thickness setting which is incorrect so use the default
thickness when creating new text objects.
Fixes lp:1635344
https://bugs.launchpad.net/kicad/+bug/1635344
- Removed ability to generate BOM to file
- Removed Save/Cancel window when closing table
- No longer updates table <after> table is closed
- Bugfix for field names (previously comparison was case insensitive)
- Allows grouping of matched components
- Bulk edit of components in a spreadsheet window
- User can choose to save / undo changes
- All changes are pushed to the undo stack in a single operation
- Export table to HTML / CSV output
Sadly, each unit of a component can have its own unique fields. This
change finds the last non blank field and records it. Last guy wins
and the order of units occuring in a schematic hierarchy is variable.
Therefore user is best off setting fields into only one unit. But this
scavenger algorithm will find any non blank fields in all units and use
the last non-blank field for each unique field name.
Fixes lp:1471417
https://bugs.launchpad.net/kicad/+bug/1471417
This reverts commit 0a8a659ff7.
The patch is incorrect, as it removes the FP chooser drop-down list.
I cannot reproduce the crash with the patch reverted, so there must
have been something specific to my configuration at that time.
Create dialog and code to allow legacy schematic symbols to be remapped
from the old library path look up method to the new symbol library table
method by using the following steps:
1) Create a project symbol library table containing all of the symbol
libraries defined in the old library look up list not found in the
global symbol library table.
2) Map each symbol to the correct symbol in the symbol library table
if possible.
Recreate library link to symbols so look up method can be converted to
symbol library table properly.
Add function to SCH_COMPONENT to link library symbols using the symbol
library table.
Add loading symbol library table code to schematic PROJECT object.
Fix minor issues with loading global symbol library table.
Add default symbol library path environment variable to the environment
variable list and change the variable name to KICAD_SYMBOL_DIR.
Add code to SCH_SCREENS to test if all library nicknames of the symbol
library IDs are empty.
Remove unnecessary KICAD_USE_SCH_IO_MANAGER build option.
Fix if statement logic to ensure the unit number is never set to zero.
Add logic to the legacy schematic plugin to automatically convert any
schematic files that have components with a unit setting of zero. Set
the schematic modified flag so that the user will be notified of a
changed schematic.
Add a user warning when the schematic parser fixes the bug and sets
the file modified flag.
Fixes lp:1677282
https://bugs.launchpad.net/kicad/+bug/1677282