Commit Graph

244 Commits

Author SHA1 Message Date
Jon Evans 32a7d00256 Make sure projects are cleaned up nicely when frames close
PROJECT objects will be deleted by SETTINGS_MANAGER::UnloadProject
so we need to make sure that this is called at an early enough point
in the closing process that anything needed by the PROJECT dtor
is still around.

Also fix an issue where the schematic worksheet was depending on
the project existing after the schematic had been reset.
2020-08-08 16:52:57 -04:00
Jeff Young 3522fd0535 Refresh for colour changes.
Fixes https://gitlab.com/kicad/code/kicad/issues/4983
2020-08-05 22:56:07 +01:00
Jeff Young 4479fcc6dc Give HardReset() a better chance of success. 2020-07-27 21:55:08 +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 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
Jeff Young 9b92b275de Remove vestiages of old open-PCB-for-settings hack.
We used to have to open a PCB_EDIT_FRAME to get the settings for
the footprint editor and footprint viewer.  This necessitated some
special processing when opening a PCB_EDIT_FRAME to actually edit
a board as it might already be open but unloaded.

Since the new settings architecture allows the footprint editor and
footprint viewer to init themselves we no longer need the special-
case code.
2020-07-11 21:19:49 +01:00
Jon Evans b1b9cef5fb Full-project automatic backup system
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4763
2020-07-09 13:55:19 +00: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 ec6c1b80b7 Fix a couple of bugs in the CurrentSheet architecture. 2020-07-05 19:53:04 +01:00
Jon Evans 04a51a5ba4 Push current sheet handling to SCHEMATIC
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4803
2020-07-04 20:59:35 -04:00
Jon Evans 498fa8d8ba Fix some things about template fieldname synchronization 2020-07-02 23:42:36 -04:00
Jon Evans 4dbbe1cf68 Project settings fixes from review
- Fix file extension for new project
- Fixes for exceptions on MSW
- Fix some ASAN issues
- Allow SETTINGS_MANAGER to run headless
- Don't flag schematic as modified after schematic setup is closed
- Don't automatically unload projects when LoadProject is called
- Don't unload project if it's the same as the current one
- Make sure to properly init/de-init template field names
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
Jeff Young c48f4272f3 Collapse a level out of the zoom settings.
The APP_SETTINGS_BASE now holds the list of zoom factors, and
the old legacy (screen-based) code has been removed.
2020-06-13 22:44:16 +01:00
Jeff Young f84406009b Push a couple of layers of indirection out of grid settings. 2020-06-13 11:35:56 +01: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
Ian McInerney fca7ade81f Move to the AUI version of the infobar
The sizer-based version had issues with the event processing
inside the GAL panel on Windows systems.

Fixes https://gitlab.com/kicad/code/kicad/issues/4501
2020-05-21 18:22:56 +01:00
Jon Evans 7c7b7f41da Move SCH_SCREEN project access to SCHEMATIC
SCH_SCREEN no longer needs to be a KIWAY_HOLDER
2020-05-20 22:27:48 -04: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
Jeff Young 7bb280ea39 General cleanup. 2020-05-19 20:48:47 +01:00
Jon Evans 4e2e280bf4 Fix part adding 2020-05-19 13:24:57 -04:00
Ian McInerney a2f027e063 Add an infobar widget to display information above the canvas
This widget allows for non-intrusive display of text
above the editing canvas. Currently, this is used
for displaying the read only status of the files.
2020-05-19 00:46:33 +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
Jeff Young c66bf3df67 Move tool shutdown to after all cancel opportunities.
Fixes https://gitlab.com/kicad/code/kicad/issues/4401
2020-05-12 00:07:19 +01:00
Jon Evans 108cf23892 Restore separate libedit settings for common settings params
Be careful when calling config() in eeschema/libedit/pcbnew/modedit
It's usually not the thing you want.

A better fix for #4389
2020-05-10 18:02:58 -04: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 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
Jon Evans 2eaefb4874 Improve performance of schematic load and connectivity
Store component paths and references efficiently
Remove redundant calls to RecalculateConnections
2020-04-30 19:53:25 +00:00
Ian McInerney d006acecf4 More window sizing fixes
* Push all sizing operations into EDA_BASE_FRAME
* Save the unmaximized window size when maximizing
  so that we can then save it in the config if the
  window is maximized. Otherwise the config ends up
  with the maximized size saved, and weird behavior
  occurs when unmaximizing on the next opening.
2020-04-27 00:14:12 +01: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
Jeff Young cb89e18281 Get rid of the visible axes in Eeschema. 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
Ian McInerney 3b67e3d0a4 Rewrite window positioning logic
Now only reposition a window if it is completely on a
disconnected display or if only one corner is on screen
and it is within a region close to the screen border.

CHANGED: Window position on startup should be preserved more
2020-04-18 00:47:38 +01: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
Wayne Stambaugh 2f682b6c5f Eeschema: implement s-expression schematic file format parser.
Fix a few issues with the s-expression schematic file formatter.
2020-04-06 22:47:42 +00: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
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 dccc367864 Remove code missed in the modern-toolset move. 2020-03-06 16:23:44 +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