Commit Graph

192 Commits

Author SHA1 Message Date
PJM d1322e7d1d Refactor GetDocumentExtents()
CHANGED: GetDocumentExtents() in 'eda_draw_frame.h' now has a bool
parameter "aIncludeAllVisible" with a default value "true" which makes
it behave as it did before adding parameter.  If "aIncludeAllVisible"
is false, the returned bbox ignores some items depending on which
program it is running in.

CHANGED: Made "Zoom to Objects" use only PCB edge in Pcbnew.  This
allows text, notes, etc outside the PCB edge to be excluded in the
zoom calculation.

CHANGED: Added "Zoom to Objects" to Pcbnew main menu, and to RMB context
menus for Eeschema and Pcbnew.

Fixes https://gitlab.com/kicad/code/kicad/issues/5787
2020-09-25 00:31:56 -07:00
Seth Hillbrand 02a5d47de9 Avoid passing references in EESchema
This returns the connection list by value.  This allows easier Python
use

Also renames m_End() to GetEnd()
2020-09-08 06:29:27 -07:00
Wayne Stambaugh c9fa46ace8 Eeschema: allow symbols to be edited in place.
ADDED: Support to allow schematic symbols to be edited in place.
2020-09-01 07:28:20 -04:00
Jon Evans 38a4e4ad5a Remove the last bits of the old netlist system 2020-08-30 16:30:04 -04:00
Jeff Young 20211eed49 Unroll a level of prefs for fieldname templates.
It was playing havoc with the saving of project and global templates
without one overwriting the other.

Fixes https://gitlab.com/kicad/code/kicad/issues/5415
2020-08-30 18:58:18 +01:00
Mark Roszko 1082402b33 Convert UNDO_REDO_T to an enum class 2020-08-26 18:04:32 +00:00
Mark Roszko 89e74140eb Save file / window states for kicad project locally 2020-08-24 02:01:14 +00:00
Wayne Stambaugh c14065ee98 Fix initial zoom to fit size in schematic and board editors.
This may affect other EDA_DRAW_FRAME objects as well but it doesn't seem
to be as noticeable in the symbol, footprint, and worksheet editors.

Fixes https://gitlab.com/kicad/code/kicad/issues/5248
2020-08-20 10:33:30 -04:00
Ian McInerney fd4388710d Migrate eeschema, libview and libedit to the UI condition framework
Also, fix some issues in other frames identified along the way.
2020-08-16 19:10:25 +00:00
Jeff Young 2b0b7a5153 Clear pin net-name-driving cache when changing annotation.
Also update connectivity after clear annotation, annotate or back
annotate.

Also update status bar for highlighted nets.

Fixes https://gitlab.com/kicad/code/kicad/issues/5170
2020-08-14 12:41:20 +01:00
Jeff Young 3fd0a3f842 Update text variables even when they're changed from other binary.
For instance, you might have PCBNew open but change the variable
value through EEschema > Schematic Setup.

Fixes https://gitlab.com/kicad/code/kicad/issues/4918
2020-07-17 21:05:11 +01:00
Jeff Young 1cd2a51db2 Make undo/redo lists protected. 2020-07-13 15:53:36 +01:00
Jeff Young 7340c97ef9 Undo for schematic-wide operations.
Editing value/footprint fields of multi-unit components.
Find/Change.
Annotation.
Back annotation.

Fixes https://gitlab.com/kicad/code/kicad/issues/2122

Fixes https://gitlab.com/kicad/code/kicad/issues/4869

Fixes https://gitlab.com/kicad/code/kicad/issues/3933

Fixes https://gitlab.com/kicad/code/kicad/issues/4871

Fixes https://gitlab.com/kicad/code/kicad/issues/3899
2020-07-13 12:32:17 +01:00
Jon Evans 0410fdd9fb Push a few missed project settings out of the frame
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4823
2020-07-06 17:30:27 -04:00
Jeff Young 3939b31027 Integration of netclasses into Eeschema.
This is mostly architecture, with the hookup of the Schematic Setup
dialog's Net Classes page.  Things like assigning to a net on the
canvas to follow.

Fixes https://gitlab.com/kicad/code/kicad/issues/2132

Fixes https://gitlab.com/kicad/code/kicad/issues/4581
2020-07-06 20:00:50 +01:00
Jon Evans fe5959b625 Remove the schematic and board backup file system
Per discussion on the developers list, this old system
no longer provides much value and is seen as annoying
by many users.  The new save logic should prevent any
cases of file corruption on save, which was a major
reason for the backup file system existing.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2012
2020-07-02 22:08:54 -04:00
Jon Evans 12b4a55ae8 Port Eeschema to new project settings
DRC/ERC error serialization changed to use explicit tokens
Old stored severities and ignored errors are discarded
2020-07-02 22:08:54 -04:00
Wayne Stambaugh 037898f6fb Eeschema: add support for excluding symbols from board.
ADDED: Support for excluding symbols from board during.  This allows for
creating bill of materials only symbols.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2522
2020-06-10 10:57:28 -04:00
Jeff Young f3e4e61fa7 Push some more editing code out to the tool framework. 2020-05-27 23:29:51 +01:00
Jeff Young 160981ee71 Better error reporting for DRC rule parsing. 2020-05-25 22:51:47 +01:00
Jon Evans c7daf8a8f3 ADDED: Cross-probe highlighting of bus members
Note: this is a basic implementation but it could be
improved once we include bus information in the netlist
and pcbnew can natively keep track of buses and nets
instead of just nets.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4158
2020-05-24 13:30:23 -04:00
Jon Evans 1e69f592f6 Rework net highlighting to use connections instead of strings
Fixes https://gitlab.com/kicad/code/kicad/-/issues/1933
Fixes https://gitlab.com/kicad/code/kicad/-/issues/3921
2020-05-24 10:46:05 -04:00
Jon Evans e934f8b459 Remove python netlist QA facilities 2020-05-23 22:48:09 -04:00
Jon Evans a63df2fbf0 Remove BuildNetListBase from netlisting paths 2020-05-23 13:14:05 -04:00
Jeff Young d61b6f965e Flatten some settings and remove some more globals. 2020-05-23 16:50:33 +01:00
Jon Evans fbc42a8cb5 Move schematic defaults to SCHEMATIC and add some missing settings entries 2020-05-20 00:03:23 -04:00
Ian McInerney 73a1ce3e84 Move eeschema find notification to the infobar and improve the infobar widget
* Move it to a panel along with the canvas to have a better UI
* Allow the infobar to automatically close after a set time

CHANGED: The eeschema find notifications now use the infobar instead of
a popup window
2020-05-20 02:31:47 +01:00
Jon Evans d7bd4c9b04 Move Eeschema globals to new SCHEMATIC object
Set up a new lineage for SCH_ITEMS to get back to the SCHEMATIC
they live on: Items will all be parented to the SCH_SCREEN that
they are added to, and each SCH_SCREEN will point back to the
SCHEMATIC that it is part of.  Note that this hierarchy is not
the same as the actual schematic hierarchy, which continues to
be managed through SCH_SHEETs and SCH_SHEET_PATHS.
2020-05-18 13:04:56 -04:00
Ian McInerney e662e33104 Store the current filename in the history on close 2020-05-17 00:12:49 +01:00
Jon Evans d599648ec7 ADDED: Enable color themes for schematic printing 2020-05-16 13:19:43 -04:00
Jeff Young 724c669434 Move a few more commands to tool framework. 2020-05-12 18:12:38 +01:00
Wayne Stambaugh e253862f77 Eeschema: remove automatic conversion of time stamp UUIDs.
In order to avoid confusion when loading legacy schematics, updating time
stamp UUIDs is no longer performed.  If users where not experiencing issues
with time stamp clashes with shared schematics then this was probably a
case of me being overly cautious.

The original conversion code has be moved to
SCH_EDIT_FRAME::ConvertTimeStampUuids() so the working functionality is
not lost.  This function should not be used until a way is found to update
the board from the schematics with the appropriate settings.
2020-05-07 09:26:43 -04:00
Wayne Stambaugh 169f63a6c0 Eeschema: make schematic sharing truly safe across all designs.
There has been a long standing (since the beginning of the project?)
issue with sharing schematics between projects.  It has been somewhat
supported for complex hierarchies (a sheet shared multiple times in a
single design) but it has not been well supported for simple hierarchies
(the symbol references cannot be changed in the shared schematic).  This
issue has been resolved by moving all of the symbol instance sheet paths
from the symbol definitions in the all of the project files and save all
symbol path instances in the root sheet.  This ensures that orphaned
symbol instance paths do not accumulate in shared schematic files and
that designs that reuse schematic in simple hierarchies can how have
different references.  It also allows the root schematic from one project
to be uses as a sub-sheet in another project.

When legacy schematics are loaded, all sheet and symbol UUIDs are
converted from time stamps to true UUIDs.  This is done to ensure there
are no sheet path instance clashes between projects.  That being said,
there are no checks for this.  It is assumed that the probability of
UUID clashes is so low that it doesn't make sense to test for them.
2020-05-04 12:40:03 +00:00
Wayne Stambaugh 7183e9f97e Make the new schematic and symbol library file formats the default.
This is a very large and potentially disruptive change so this will be an
unusually long and detailed commit message.

The new file formats are now the default in both the schematic and symbol
library editors.  Existing symbol libraries will be saved in their current
format until new features are added to library symbols.  Once this happens,
both the legacy schematic and symbol file formats will be no longer be
savable and existing libraries will have to be converted.  Saving to the
legacy file formats is still available for round robin testing and should
not be used for normal editing.

When loading the legacy schematic file, it is imperative that the schematic
library symbols are rescued and/or remapped to valid library identifiers.
Otherwise, there will be no way to link to the original library symbol and
the user will be required manually set the library identifier.  The cached
symbol will be saved in the schematic file so the last library symbol in
the cache will still be used but there will be no way to update it from the
original library.

The next save after loading a legacy schematic file will be converted to
the s-expression file format.  Schematics with hierarchical sheets will
automatically have all sheet file name extensions changed to .kicad_sym
and saved to the new format as well.

Appending schematics requires that the schematic to append has already been
converted to the new file format.  This is required to ensure that library
symbols are guaranteed to be valid for the appended schematic.

The schematic symbol library symbol link resolution has been moved out of
the SCH_COMPONENT object and move into the SCH_SCREEN object that owns the
symbol.  This was done to ensure that there is a single place where the
library symbol links get resolved rather than the dozen or so different
code paths that previously existed.  It also removes the necessity of the
SCH_COMPONENT object of requiring any knowledge of the symbol library table
and/or the cache library.

When opening an s-expression schematic, the legacy cache library is not
loaded so any library symbols not rescued cannot be loaded.  Broken library
symbol links will have to be manually resolved by adding the cache library
to the symbol library table and changing the links in the schematic symbol.

Now that the library symbols are embedded in the schematic file, the
SCH_SCREEN object maintains the list of library symbols for the schematic
automatically.  No external manipulation of this library cache should ever
occur.

ADDED: S-expression schematic and symbol library file formats.
2020-05-04 12:40:03 +00:00
Jeff Young 1535c83b88 Lay some groundwork for adding distances to DRC errors.
modified:   eeschema/lib_rectangle.cpp
2020-04-24 14:46:22 +01:00
Jon Evans b802a3e776 Add command-line option to generate netlist and exit 2020-04-19 19:13:24 -04:00
jean-pierre charras 98b9c80eb4 Schematic editor: fix not working tool to show/hide invisible pins.
Fixes #4222
https://gitlab.com/kicad/code/kicad/issues/4222
2020-04-18 09:57:04 +02:00
Jeff Young 9c8941e040 Remove a bunch of globals. 2020-04-16 17:34:46 +01:00
Jeff Young 122b1ddaae Unwrap an unnecessary layer now that we have new config stuff. 2020-04-13 20:58:12 +01:00
Jeff Young 591428b0d9 Remove some problematic global variables.
Fixes https://gitlab.com/kicad/code/kicad/issues/4121
2020-04-05 16:17:04 +01:00
Jeff Young 41b5872f12 Add ERC & DRC checks for unresolved variables. 2020-03-30 14:15:59 +01: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 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
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 535033c5c9 Enable editing of sheet fields. 2020-03-07 18:52:30 +00:00
Jeff Young dccc367864 Remove code missed in the modern-toolset move. 2020-03-06 16:23:44 +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
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 e033e394e7 Add visibility flags for sheet names and sheet filenames. 2020-02-20 21:29:52 +00:00