Commit Graph

5285 Commits

Author SHA1 Message Date
Jeff Young d25a63cd02 Don't allow selection flags to leak in to the libmanager cache.
Fixes https://gitlab.com/kicad/code/kicad/issues/4021
2020-03-21 23:25:08 +00:00
Jeff Young 66382db7dd Add some defensive code for selection anomalies.
Fixes https://gitlab.com/kicad/code/kicad/issues/4021
2020-03-21 20:55:50 +00:00
Jeff Young 93b7eacfb2 Fixup some Coverity issues. 2020-03-21 16:32:22 +00:00
Seth Hillbrand ba8c3a5582 Reverting part of cee973dc04
Iterators are invalidated by vector reallocation.  We need to keep the
count in the loop in order to have a valid position in the vector

Fixes https://gitlab.com/kicad/code/kicad/issues/4073
2020-03-20 08:44:21 -07:00
Jeff Young 204f2cd580 Reference -> reference designator.
Fixes https://gitlab.com/kicad/code/kicad/issues/4012
2020-03-17 16:09:25 +00:00
Jeff Young 40b2eabfc1 Add a user-defined ratio for text offset from wire/bus.
Fixes https://gitlab.com/kicad/code/kicad/issues/2392
2020-03-17 12:50:31 +00:00
jean-pierre charras 0f0b9bdf87 SIM_PLOT_FRAME_BASE: gives a minimal size for right panels.
On KDE, a too small size can hang wxWidgets.
2020-03-17 08:27:34 +01:00
Jeff Young c9f8716414 Fix copy/paste error. 2020-03-16 19:17:21 +00:00
jean-pierre charras 53dfcd84cb Fix missing include
Fixes #4058
https://gitlab.com/kicad/code/kicad/issues/4058
2020-03-16 19:09:35 +01:00
Wayne Stambaugh 7dc64f08b7 Eeschema: implement s-expression schematic file formatter.
Please note that the symbol cache is not embedded in the schematic file
to allow for round robin testing with the existing file format.  Once
the parser round robin testing is complete, the symbol cache will be
embedded in the schematic file.
2020-03-16 09:05:16 -04:00
Jeff Young cee973dc04 Move ERC error reporting over to the new framework.
Fixes https://gitlab.com/kicad/code/kicad/issues/1989
2020-03-16 11:06:15 +00:00
Jeff Young 222b222299 Improve ease of understanding around PCB <-> schematic links.
Includes improvements to Update PCB from Schematic dialog and
corresponding changes to Symbol Properties, Sheet Properties and
Footprint Properties.

Fixes https://gitlab.com/kicad/code/kicad/issues/4012
2020-03-16 11:06:15 +00:00
Jeff Young 095bede3ba Fix initialisation issue.
Fixes https://gitlab.com/kicad/code/kicad/issues/4014
2020-03-13 17:28:53 +00:00
Jeff Young 085d80e3f3 Remove duplicated settings from preferences.
These have now moved to project-specific settings.
2020-03-13 17:28:53 +00:00
Jeff Young dc9882c3b9 Fix a few bugs with Sheet field dragging and rotating.
Fixes https://gitlab.com/kicad/code/kicad/issues/4046
2020-03-12 13:57:29 +00:00
Seth Hillbrand 9de7547c25 Partial revert of 134a7ba85
The margin fix prevented some schematics from printing.  Reverting in
favor of transitioning to the Cairo print base in eeschema
2020-03-11 15:24:08 -07:00
Jeff Young c699fb9e39 Move pin-to-pin errors to Setup Schematic. 2020-03-11 21:43:55 +00:00
Jeff Young 437f888c25 Schematic Setup dialog.
Includes:
- moving some of the project settings from the Preferences dialog
- ERC severites
- project-specific field-name templates

Fixes https://gitlab.com/kicad/code/kicad/issues/2145
2020-03-10 18:54:17 +00:00
Jeff Young b054e59a41 Get rid of cursors in preview panels. 2020-03-10 18:54:17 +00:00
Jeff Young bbf5ad6160 Improve dialog spacing and remove 'auto' type decls.
Also fixes a couple more coding style issues.
2020-03-10 18:54:17 +00:00
Wayne Stambaugh 8cc80e3b35 Add unit test for testing LIB_ARC objects.
Added tests for calculating radius angles and arc mid point.
2020-03-10 11:04:05 -04:00
Jeff Young 457f12a5df Remove extra SyncLibraries() call.
I imagine this was inserted to ensure the selected item is visible,
but selecting the item does that.  SyncLibraries() rebuilds the
entire tree, causing it to lose the user's scroll position.

Fixes https://gitlab.com/kicad/code/kicad/issues/4020
2020-03-08 15:18:19 +00:00
Jeff Young 3e34c1783f Added sheet border width, border color and background color.
Fixes https://gitlab.com/kicad/code/kicad/issues/2216
2020-03-08 15:18:19 +00:00
Jeff Young 0905ef8eb5 Autoplacement only handles mandatory fields for Sheets. 2020-03-08 15:18:19 +00:00
jean-pierre charras 37befc5a42 fix compil issue. 2020-03-07 20:49:45 +01:00
Jeff Young 535033c5c9 Enable editing of sheet fields. 2020-03-07 18:52:30 +00:00
Jeff Young fe3e0307d8 Move sheet name and filename to SCH_FIELD architecture.
Only internal storage architecture has changed (so far).
2020-03-06 16:23:44 +00:00
Jeff Young dccc367864 Remove code missed in the modern-toolset move. 2020-03-06 16:23:44 +00:00
Jon Evans 34ceee14ed Improve color button padding 2020-03-06 08:14:12 -05:00
Jon Evans 5ed173ef1b ADDED: LibEdit can have a different color theme than Eeschema 2020-03-06 00:01:02 -05:00
Jon Evans 643c97a2f4 ADDED: Schematic plotting can use a dedicated color theme
ADDED: PDF, PS, and SVG plots can optionally include the page background color

Fixes #1830
2020-03-06 00:01:02 -05:00
Jon Evans 8660b4c144 ADDED: New color theme editor and multi-theme support 2020-03-06 00:01:03 -05:00
Jon Evans 1e104d5bd4 Don't promote globals from locals on a different sheet
Fixes #4004
2020-03-05 19:08:55 -05:00
jean-pierre charras 3e78403576 Eeschema: cosmetic enhancement: display sheet UUID and path in dialog and bottom frame. 2020-03-05 13:20:38 +01:00
jean-pierre charras b7cd0c54c2 Fix compil issues, especially on Windows:
Replace SEVERITY_ERROR by RPT_SEVERITY_ERROR to avoid collision with a system definition.
Replace other SEVERITY_XXX by RPT_SEVERITY_XX for consistency.
Fix compil warnings and some other compil issues.
2020-03-04 10:48:18 +01:00
Jeff Young 21469efa63 Make sure EESCHEMA definition gets passed into common.cpp.
Also includes a fix to seed timestamps that got incorrectly
written out as '00000000' because of the above.

Fixes https://gitlab.com/kicad/code/kicad/issues/3977
2020-03-04 02:04:18 +00:00
Jeff Young 85c2e0d23a Add user-defined severities, exclusions and colors to DRC markers.
Exclusions are currently persisted in the project file.

Fixes https://gitlab.com/kicad/code/kicad/issues/1989
2020-03-04 00:39:28 +00:00
Seth Hillbrand e359144305 Missed one file for previous commit
This is the actual fix for issue #3982
2020-03-03 14:05:49 -08:00
Seth Hillbrand 2cff50d7a8 Fix return value for new plugin
Even when we throw, we still need to provide a default return value that
will never be reached for MSVC

Fixes #3982 | https://gitlab.com/kicad/code/kicad/issues/3982
2020-03-03 14:02:37 -08:00
jean-pierre charras 30bc8fac5d Annotate dialog: fix incorrect list of changes in complex hierarchies
Previously, to list changes, the Reference field was used in comparisons.
In complex hierarchies, this is incorrect: the Reference field contains
only the last displayed reference, not the reference of a given sheet.

The comparison uses now the sheet paths for ref and unit selection.
2020-03-03 19:41:19 +01:00
Seth Hillbrand 20fde2c16f eeschema: Fix find from RTree change
The RTree doesn't keep pins and fields in the tree, so we need to search
for them differently.

Fixes #3979 | https://gitlab.com/kicad/code/kicad/issues/3979
2020-03-03 09:35:12 -08:00
Wayne Stambaugh 18f9ba110d Fix minor symbol library s-expression formatter and parser bugs. 2020-03-03 08:06:23 -05:00
Wayne Stambaugh 9d6f64da9a Implement symbol library s-expression parser.
This implements all existing symbol library object support and the ability
to save and load symbol library files between file formats for round robin
testing.
2020-03-03 08:06:23 -05:00
Wayne Stambaugh 738a93db68 Fix s-expression symbol library formatter build issue due to UUID support. 2020-03-03 08:06:22 -05:00
Wayne Stambaugh 1af503509d Fix s-expression symbol library formatter build issue. 2020-03-03 08:06:22 -05:00
Wayne Stambaugh 1d205e4442 Fix points formatting in s-expression symbol library file formatter. 2020-03-03 08:06:22 -05:00
Wayne Stambaugh e1900161a7 Eeschema: implement new symbol library file s-expression formatter.
CHANGES: Symbol library file format has been converted to s-expressions.

Add support code for picking apart symbols at some future junction that
will allow full inheritance conversion of existing symbol libraries.  For
now, symbols arranged by unit and body style numbers are nested for round
robin testing of symbol libraries once the parser is complete.
2020-03-03 08:06:22 -05:00
jean-pierre charras 20ca5a6973 Eeschema, dialog_edit_component_in_xxx: minor cosmetic enhancements.
Especially, UUID is bigger than old timestamp, so enlarge display widget.
2020-03-02 14:29:18 +01:00
Jon Evans 90bd351807 Properly flush color settings after migration
Also fix missing gerbview migration

Fixes #3965
2020-02-29 21:49:35 -05:00
Simon Richter 866aac9737 Clean up a few unused names of caught exceptions 2020-03-01 00:33:45 +00:00
Ian McInerney c31089d9f4 eeschema: Properly set bold and italic properties in global text edit dialog
Fixes https://gitlab.com/kicad/code/kicad/issues/3963
2020-03-01 00:23:46 +00:00
Jeff Young 3f31d48b5e Use a more friendly method of ensuring unique sheet names.
Also fixes a bug where we were failing to respect the
forceKeepAnnotations flag when processing content nested in
a sheet.

Fixes https://gitlab.com/kicad/code/kicad/issues/3681
2020-02-29 00:07:57 +00:00
Seth Hillbrand 081ec393da eeschema: Load using root sheet if null
The root sheet is not set for pasting, in which case, we should utilize
the global root if needed.

Fixes #3956 | https://gitlab.com/kicad/code/kicad/issues/3956
2020-02-28 11:09:41 -08:00
Ian McInerney d5ceb8252e Clean up some warnings 2020-02-28 00:06:52 +00:00
Seth Hillbrand 245b778454 libedit: Fix speed of lib check
The symbol check output the HTML message for each item.  This is _very_
slow and can lock the system reponsiveness.  Changing to a queue/flush
method is much faster
2020-02-27 15:06:48 -08:00
Ian McInerney b2cc454878 Also verify that the .dcm is writable when saving library
Fixes https://gitlab.com/kicad/code/kicad/issues/3946
2020-02-26 19:21:29 +00:00
Jeff Young 0614bbc663 Silence a couple of compiler warnings. 2020-02-25 18:26:42 +00:00
Ian McInerney 879a8f4efb Rework the file history menus to not need references to the file history
Keeping a pointer to the actual file history inside a special
file history menu led to many cases of use after free crashes,
so instead rework the actual file history to add the menu
items.

Fixes https://gitlab.com/kicad/code/kicad/issues/3741
2020-02-25 16:18:10 +00:00
Jeff Young c7ec110fba Only center focused items when they're not visible.
This includes outside the window and behind an occluding dialog.
This keeps the view from jumping around when focusing on nearby
objects.
2020-02-24 23:19:17 +00:00
Jeff Young c68b554c8e Promote PathsAndReferences from wxArrayString to first-class-citizen.
Keeping the data in an un-serialized format greatly simplifies usage,
and should make it more robust.
2020-02-24 23:19:17 +00:00
Jon Evans b4786e4121 Cross-probe into schematic using selection rather than HIGHLIGHTED flag 2020-02-23 22:07:18 -05:00
Jon Evans 41f59ab873 Avoid intermittent compiler crash in GCC 7.4
Somehow the previous way this statement was written can cause an
internal compiler crash on gcc 7.4.0-1ubuntu1~18.04.1 sometimes.
2020-02-22 21:26:48 -05:00
Seth Hillbrand 68be5fc1f4 Eagle: Set linewidth in polylines 2020-02-22 10:44:30 -08:00
Seth Hillbrand 62cc733fe6 Eagle: update RTree after moving schematic
After importing, some schmeatics are moved, item at a time.  When moving
schematic items, we need to update the RTree bounding box to allow
searching on position

Fixes #3915 | https://gitlab.com/kicad/code/kicad/issues/3915
2020-02-22 10:31:07 -08:00
Jeff Young 83057a48e1 Write Eeschema "AR" references in legacy timestamp format.
Also fixes a bug with path separators not getting added to the
m_PathsAndReferences array.

Fixes https://gitlab.com/kicad/code/kicad/issues/3925
2020-02-21 23:20:57 +00:00
Jeff Young ea025a35e5 Change KUUID to KIID. 2020-02-21 22:20:42 +00:00
Jeff Young 383403ef98 Push deprecation warning suppression down into boost.
Note: requires boost 1.67 or later.
Current boost version is 1.72.
2020-02-21 17:36:12 +00:00
Jon Evans e8e3b4f11e Rename UUID to KUUID to fix MSVC build
Also add another newly-required boost flag
2020-02-20 22:07:17 -05:00
Jeff Young 2778dc90f3 Cleanup. 2020-02-20 23:52:32 +00:00
Jeff Young e69c82f45f Back out changes which updated the eeschema file format.
We'll wait until we have the new eeschema format to turn on UUID
generation for Eeschema.  Right now only Pcnbew generates full UUIDs.
2020-02-20 23:40:30 +00:00
Jeff Young 490f39a671 Remove obsolete code requiring unique sheet names. 2020-02-20 22:56:11 +00:00
Jeff Young e1d59337d1 Protect GCC #pragmas. 2020-02-20 22:20:44 +00:00
Jeff Young e033e394e7 Add visibility flags for sheet names and sheet filenames. 2020-02-20 21:29:52 +00:00
Jeff Young 81dd1d7a68 Timestamp-based paths were ugly. UUID-based ones are worse.
Show a human-readable path in the Edit Footprint dialog.
2020-02-20 21:29:52 +00:00
Jeff Young 129042f8a6 Convert timestamps to UUIDs. 2020-02-20 21:29:52 +00:00
Jeff Young d374abc79b Remove unused functionality. 2020-02-20 21:29:52 +00:00
Jon Evans e59a3d981e Implement a new settings framework across all of KiCad
CHANGED: Settings are now stored in versioned sub-directories
ADDED: First-run dialog for migrating settings from a previous version
CHANGED: Settings are now stored as JSON files instead of wxConfig-style INI files
CHANGED: Color settings are now all stored in a separate settings file
CHANGED: The symbol editor and footprint editor now have their own settings files
CHANGED: Color settings are no longer exposed through BOARD object
CHANGED: Page layout editor now uses Eeschema's color scheme

Settings are now managed through a central SETTINGS_MANAGER held by PGM_BASE.
Existing settings will be migrated from the wxConfig format on first run of each application.
Per-application settings are now stored in one class for each application.
2020-02-19 23:44:56 -05:00
jean-pierre charras 2ca16c0b29 eeschema: fixes some issues related to translated and not translated field names.
When searching for fields, the code was sometimes comparing translated and not translated names.
This is an issue for mandatory fields, in non English languages.

Translated field names should be used only in messages.
2020-02-16 17:52:53 +01:00
jean-pierre charras 021eb2f3a8 Fix incorrect usage of a UTF8 char in a C string in code.
Using a UTF8 char inside a C string can work on unix, but not on Windows.
It must be explicitly converted in a unicode value inside a wide string
(like a wxString)
2020-02-16 10:21:36 +01:00
Ian McInerney a0698723b9 Auto-rotate sheet pins onto the top and bottom when moving
Fixes https://gitlab.com/kicad/code/kicad/issues/2178
2020-02-15 18:45:10 +00:00
Ian McInerney 4fef513a3f Fix library table panel path adding and cleanup duplicate dialog
When adding a .pretty library, if the actual .pretty folder were
selected then no folder would be added to the list of libraries.
This led to an assert when normalizing paths, and the library
not being added.
2020-02-14 19:07:27 +00:00
Jeff Young 3ec360f15c Save pinned libraries in project.
Fixes https://gitlab.com/kicad/code/kicad/issues/2288
2020-02-14 14:22:54 +00:00
Sylwester Kocjan 0aa6e43783 eeschema: dialog_edit_component: fixed removing negative number of rows from grid. 2020-02-14 15:07:06 +01:00
jean-pierre charras f17f10d2a6 Eeschema, DIALOG_UPDATE_FIELDS: ensure mandatory fields are put in list.
Add also a comment in common.cpp about using wxLocale instead of setlocale.

DIALOG_UPDATE_FIELDS has issues in non English languages, due to its design.
The fix for mandatory fields is only a partial fix that avoid major issues.
2020-02-14 13:07:13 +01:00
Ian McInerney 25b3cce474 Fix build error and cleanup overzealous refactor changes 2020-02-14 00:56:41 +00:00
Jeff Young 2017389f2d Pinning for library trees in FPEditor and SymbolEditor.
Fixes https://gitlab.com/kicad/code/kicad/issues/2288
2020-02-14 00:10:40 +00:00
Wayne Stambaugh f502208211 Eeschema: fix selection thickness setting bug.
Fix minor control padding and alignment issues in the schematic display
options panel.
2020-02-13 09:19:40 -05:00
Seth Hillbrand 03f74c87a1 Update immediate mode location and restart wires
The immediate action option clears (or not) the position of the events.
We use this to determine if the command should start at the given
position or merely activate the tool.  This was being checked in the
menu options, which only activated for tool commands in the context
menu.  Moving to the process event, we catch hotkeys as well.

This also restores the previous logic in eeschema that used a static
variable for storing wires rather than the private class variable.
Starting the draw event now picks up from the existing wires when
activated in immediate mode.

Fixes #3891 | https://gitlab.com/kicad/code/kicad/issues/3891
2020-02-11 09:12:36 -08:00
Jon Evans 27fb664693 Fix polarity of "drag is drag" checkbox
Fixes https://gitlab.com/kicad/code/kicad/issues/3861
2020-02-11 09:22:18 -05:00
Karl Zeilhofer 1190e60dd4 Fixes issue #3820, text was not selected by default 2020-02-09 03:40:24 +01:00
jean-pierre charras ba9dedaaf3 Eeschema, point editor: constraint corners of a SHEET symbol to stay on 50 mil grid
Fixes #3867
https://gitlab.com/kicad/code/kicad/issues/3867
2020-02-07 10:06:01 +01:00
jean-pierre charras b0367f5a34 Eeschema: fix a crash on closing the schematic editor if the point editor is active.
If the point editor is active and a change is made, the tool was shut down after
deleting the board data, in the frame Dtor.
Therefore a crash happened because a call to GetScreen()->SetModify(); using a null pointer,
and after the test for modifications was done.
Now tools are stopped when closing the window, before any test for modifications.
2020-02-07 10:02:47 +01:00
Jonathan Warner 469c1c14ef Eeschema: adjusted component sorting to work better 2020-02-06 06:02:51 -07:00
Ian McInerney b1240b5b1e Gracefully shutdown tools when frames are closed
If the tools are not gracefully exited, then the stack variables are
never destroyed, so variable lifetime issues can occur.

Fixes https://gitlab.com/kicad/code/kicad/issues/1753
2020-02-05 22:23:24 +00:00
Ian McInerney 34e5b76c5f Add virtual constructors to some classes that should have them
This is more for safety from undefined deletion behavior than
anything else (it also silences the Clang -Wnon-virtual-dtor warning).
2020-02-05 22:19:14 +00:00
Jon Evans fe375b4419 Allow sheet pins to be strong drivers if they don't conflict with anything
Also try harder to match bus members in case one was renamed by a higher
priority label.

Fixes https://gitlab.com/kicad/code/kicad/issues/3797
2020-02-05 14:23:55 +00:00
Seth Hillbrand 7d64527eeb eeschema: Handle Rebuild for subcomponents
The parents are the only items that live in the RTree, so the rebuild
check needs to recurse into the sub structure to check for selection

Fixes https://gitlab.com/kicad/code/kicad/issues/3858
2020-02-04 22:49:43 -06:00
Jeff Young 2507f985ad Adjust justified text for mirroring and rotation.
Fixes https://gitlab.com/kicad/code/kicad/issues/3737
2020-02-04 22:49:31 +00:00
Seth Hillbrand 134a7ba85d eeschema: Temporary fix for GTK printing offset
The full fix will be Cairo printing in v6

Fixes https://gitlab.com/kicad/code/kicad/issues/1907
2020-02-04 11:26:07 -06:00
jean-pierre charras 0049185d06 Eeschema: Speed up global changes in DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS.
Previously, OnModify() was called for a lot of items, even when not modified.
For large schematics, the calculation time was unreasonable ( several minutes)
It is now called only a few times.
2020-02-04 14:04:11 +01:00
Jon Evans ac875e26a8 Fix handling of SCH_PINs on multi-unit parts
Fixes https://gitlab.com/kicad/code/kicad/issues/3770
2020-02-04 11:51:29 +00:00
Seth Hillbrand 0645442704 eeschema: Fix crash in CheckAnnotate()
CheckAnnotate cannot do anything to an empty schematic, so abort before
referencing the list
2020-02-04 04:50:23 -06:00
Seth Hillbrand 9f7e0ef8e8 eeschema: Remove Bus-Bus and Place sheet pin buttons
Cleaning toolbars of functions that are superfluous or do not match well
to the user workflow.
2020-02-04 04:39:26 -06:00
Seth Hillbrand ec8a8ffcbc eeschema: Add connections to sheet pins
Set the sheet pin to be a junction connection point that ensures the
connectivity

Fixes https://gitlab.com/kicad/code/kicad/issues/3852
2020-02-04 04:14:16 -06:00
Jeff Young a04fdf64da Improve directory handling for Project Save As.
1) don't change directory names that we don't recognize
2) when we do, make sure the child files get copied to the
changed name.

Fixes https://gitlab.com/kicad/code/kicad/issues/3834
2020-02-03 15:08:01 +00:00
jean-pierre charras 0e51ed32f9 ADDED: Sim plot panel: option to plot on a white background or a black background. 2020-02-01 18:20:18 +01:00
jean-pierre charras b8108d294f Fix a few I18n messages, and minor wxWidgets alerts. 2020-02-01 14:06:56 +01:00
jean-pierre charras bb06e672e7 DIALOG_UPDATE_FROM_PCB: fix incorrect wording of an option.
Shared sheets can create issues in a complex hierarchy.
This is not related to sharing sheets between projects.
(Sharing sheets between projects is not supported by Kicad)
2020-01-30 09:22:21 +01:00
jean-pierre charras 5d5363396c Add automatically generated files needed for translations.
These help files are created from the .md source files and contain I18n strings,
but do not exist if kicad is not built from sources.
However they are needed by translators.
2020-01-29 18:47:06 +01:00
Alexander Shuklin 3d0b3a51f3 Eeschema: Adding back annotation
ADDED: Back annotation algorithm,
eeschema back annotation dialog

CHANGED: added some minor helper methods to SCH_REFERENCE_LIST and SCH_REFERENCE,
split SCH_REFERENCE_LIST::CheckAnnotation on 2 parts to reuse code
2020-01-29 16:33:57 +00:00
Seth Hillbrand 55eb687184 Eeschema: Force output ordering
The RTree does not have a deterministic iterator, so extracting items
may be in arbitrary order, causing issues as the schematic appears to
change when comparing to previous revisions.

This uses the SCH_ITEM comparison operator to for ordering by type, then
by custom sorting within type.

For the netlist, we choose the first available unit in the sheet for
each component.

Fixes #3811 | https://gitlab.com/kicad/code/kicad/issues/3811
2020-01-28 13:31:52 -08:00
Seth Hillbrand 128ec782dd Eeschema: Add bit that was missing from commit 7ac83ac64
This part of the check removes recursive sheets from the schematic when
loading and notifies the user that their schematic has been repaired.
2020-01-27 09:38:14 -08:00
Seth Hillbrand 7ac83ac64d Check recursion before appending
We need to ensure that the appended sheet does not already exist in the
parent hierarchy.  We do this for new sheets but need to check for
existing ones as well.

Fixes #3806 | https://gitlab.com/kicad/code/kicad/issues/3806
2020-01-27 06:30:45 -08:00
Seth Hillbrand b8920a9f5a Eeschema: Add protections to eeschema rtree
Prevents items from being mistakenly added to the tree that should not
be tracked in the tree.
2020-01-25 09:32:05 -08:00
Seth Hillbrand 84a697060f Don't insert pins/text when moving
Pins and component fields belong to the parent object and need to be
avoided when moving to prevent re-insertion on update.

Fixes #3804 | https://gitlab.com/kicad/code/kicad/issues/3804

Fixes #3811 | https://gitlab.com/kicad/code/kicad/issues/3811
2020-01-25 09:30:51 -08:00
jean-pierre charras 2cd4d2440c DIALOG_LABEL_EDITOR: very minor cosmetic change. 2020-01-24 10:15:56 +01:00
Wayne Stambaugh bc68c7d949 Symbol editor: fix several internal units bugs.
When opening the symbol editor without loading the schematic editor the
default text size setting is not loaded and was defaulting to the old mils
setting.  Convert the default text size to internal units in case the
symbol editor is launched first.

Set default line, bus, and selection highlight width to internal units.

Change new symbol dialog pin position offset control from a spin control
to a text control so the unit binder object can handle converting to and
from internal units.

Fixes #3802

https://gitlab.com/kicad/code/kicad/issues/3802
2020-01-23 15:45:51 -05:00
Seth Hillbrand bcc68b2dd9 eeschema: Re-load the RTree when we re-cache components
The components are reloaded when libraries change and when loading a
schematic.  The initial load does not contain pins and so bbox hits may
miss elements.

Fixes #3800 | https://gitlab.com/kicad/code/kicad/issues/3800
2020-01-23 10:06:56 -08:00
Seth Hillbrand 995bef8736 eeschema: Cleanup around pins and bboxes for components
This adjusts and tightens code around bboxes and pin sizes.
2020-01-23 10:06:56 -08:00
Seth Hillbrand eb4a2b0b89 Prevent overlapping junction inserts
2 pins + 1 line here would mark the same spot twice for a junction.
Using a set prevents the duplicates from being inserted
2020-01-23 10:06:56 -08:00
Ian McInerney 06c979dfaa Convert all CMake paths to absolute instead of relative
It is cleaner and safer to handle the include and source paths
as absolute from the source directory instead of relative to every
path.
2020-01-22 23:27:20 +00:00
Wayne Stambaugh 8f778b5a0f Eeschema: fix sheet Eagle plugin sheet placement bug.
Convert sheet position units from mils to internal units.
2020-01-22 12:26:53 -05:00
Wayne Stambaugh cd768d83c3 Eeschema: fix sheet minimum size bug.
Convert minimum sheet width and height definitions from mils to internal
units.

Add comment to sheet minimum width and height definitions to indicate
sizes are in mils.
2020-01-22 12:26:53 -05:00
Jon Evans 41725e6b07 Sort nets in netlist by name; generate ordered net codes 2020-01-22 14:59:02 +00:00
Seth Hillbrand ef00fa6008 Cleanup busses
At some point the buses were no longer being addressed in
SchematicCleanup().  This re-adds bus segments to the checklist for
segments to merge/clean
2020-01-22 05:53:40 -08:00
Ian McInerney 0d017e262c Update documentation and comment 2020-01-22 08:47:14 +00:00
Simon Richter f87dc08801 Readd <config.h> to ngspice.cpp
This file should really be included first from any source file, because it
contains platform specific workarounds.

This also groups includes a bit by source.
2020-01-22 08:38:45 +00:00
Jon Evans da222d96b1 Fix a few issues with bus unfolding
Bus submenus weren't sending events because tool wasn't set.
Net names need to be unescaped for display.
Unfolding wasn't drawing the new wire segments.
SCH_LINE_WIRE_BUS_TOOL could get caught in an infinite event handling loop.

Fixes https://gitlab.com/kicad/code/kicad/issues/3796
2020-01-21 22:02:46 -05:00
Jeff Young 384ff2539a Fix uninitialized variables. 2020-01-21 09:29:33 +00:00
Mark Roszko 70908043a3 Convert enums inside eeschema and the symbol editor to be scoped
Scope: NETLIST_ITEM, CONNECTION_TYPE, ELECTRICAL_PINTYPE,
       NET_CONNECTION, NETLIST_ITEM, GRAPHIC_PINSHAPE

Note, the pin type enum had PT_ added to the front to prevent
shadowing of the INPUT symbol on msys2 (see discussion at
c17c9960d8)
2020-01-18 20:51:28 +00:00
jean-pierre charras d714773c22 Fix a minor compil warning. Add a wxASSERT in hierarch.cpp. 2020-01-18 18:23:21 +01:00
Wayne Stambaugh 462074d471 Eeschema: fix grid select dialog internal units bug.
Fixes #3782

https://gitlab.com/kicad/code/kicad/issues/3782
2020-01-18 11:28:01 -05:00
Seth Hillbrand a7d02a4f75 Recognize subckt blocks in spice
Spice lines defining circuit elements are contained in a .subckt ..
.ends block.  The intervening lines should be exported to the netlist as
well as the control lines.
2020-01-17 18:56:30 -08:00
Seth Hillbrand 40f97b55c7 Remove confused dynamic_cast
dynamic_cast could not resolve the cast chain leading to a null undo
point.  Since we know the item to be LIB_ITEM, we can use static_cast
anyway and avoid the overhead.

Fixes #3771 | https://gitlab.com/kicad/code/kicad/issues/3771
2020-01-16 06:17:04 -08:00
Jeff Young e4eedfa893 Catch exceptions from failed clone. 2020-01-13 15:27:16 +00:00
Jeff Young ac096fdf99 Catch exceptions from a failed library load. 2020-01-13 15:27:16 +00:00
Ian McInerney 81ee5edcaf Test dynamic_cast for safety from future changes 2020-01-13 15:22:26 +00:00
Ian McInerney 33a40e788b Add missing null check to library viewer control tool 2020-01-13 14:40:55 +00:00
Ian McInerney 36f6b4a9b4 Clean up redundant dynamic casts 2020-01-13 01:39:08 +00:00
Jeff Young 3a1585718f Remove unnecessary casts (they're just casting to a superclass). 2020-01-12 20:26:07 +00:00
Jeff Young 836c1ea56e Fix a bunch of un-caught boost::bad_pointer exceptions.
This also removes vector cover types which do nothing except obfuscate
the underlying implementation.

Mainly changes SCH_SHEET_PINS and CONFIG_PARAM_ARRAY (which will soon
be replaced by Jon's new stuff).
2020-01-12 19:55:00 +00:00
Jeff Young cc573eed31 Patch crash bug when closing symbol properties dialog. 2020-01-12 19:55:00 +00:00
Ian McInerney 960b553a70 Cleanup type casting in EE toolbase
* Ensure the lib edit undo checks for pointer validity
* Assert that the frames are the correct type (satisfies coverity)
* Convert C casts to C++ casts
2020-01-12 19:47:13 +00:00
Ian McInerney cd0d92956b Use static cast in sch_view since type has been checked 2020-01-12 19:46:17 +00:00
Ian McInerney b445ce6632 Clean up pointer casting
* Make note of when dynamic cast is actually needed
* Convert some to static cast when we know the type for sure
2020-01-12 19:45:37 +00:00
Ian McInerney 00e58cd974 Fix unintialized values (from coverity scan) 2020-01-12 13:00:42 +00:00
Ian McInerney ae91312416 Fix default pin orientation (from Coverity scan) 2020-01-12 11:55:03 +00:00
Seth Hillbrand 84d5d6c168 Eeschema: Return null in case of canceling placement 2020-01-11 17:02:55 -08:00
Jeff Young 3d8150032f Fix some uninitialized variables found by Coverity. 2020-01-11 21:29:25 +00:00
Jeff Young 1591d13839 Use static_cast since we've already checked the type.
This is faster and also keeps Coverity happy.
2020-01-11 21:29:25 +00:00