Commit Graph

632 Commits

Author SHA1 Message Date
Jeff Young f84406009b Push a couple of layers of indirection out of grid settings. 2020-06-13 11:35:56 +01:00
Ian McInerney 9d0ea66a96 Don't use the accelerator table in the menubars
It seems that the accelerator table causes issues with
keyboard events on MSW.

Fixes https://gitlab.com/kicad/code/kicad/issues/1941
2020-06-06 22:50:35 +00:00
Seth Hillbrand 916d06c1e6 Prevent multiple kiway from loading simultaneously
Each KIWAY_PLAYER has some initialization elements that may take time
before the frame is raised.  If handling is returned to the UI during
that load, we can cause reentrant issues for players.

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

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

(cherry picked from commit 5b47d1a910)
2020-06-04 16:47:49 -07:00
Wayne Stambaugh 616ac50cfb KiCad: add support for missing file format extensions.
Don't rename symbol libraries when performing a project "Save As.."
except for the legacy cache library.  Changing library file names
breaks the symbol library table.  This was the less painful  option
than updating the symbol library table.

Fixes https://gitlab.com/kicad/code/kicad/issues/4605
2020-06-03 16:13:42 -04:00
jean-pierre charras 788e29a630 Kicad, archive project: add new file ext (.kicad_sch and .kicad_sym) to file list to save.
Fixes #4575
https://gitlab.com/kicad/code/kicad/issues/4575
2020-05-29 19:49:28 +02:00
Wayne Stambaugh b624c7090a Deprecate saving legacy schematic and symbol library file formats.
REMOVED: The ability to save schematics in the legacy file format.
2020-05-29 12:43:00 +00:00
Ian McInerney e662e33104 Store the current filename in the history on close 2020-05-17 00:12:49 +01:00
Ian McInerney 0e54128146 Remove old code from KICAD_MANAGER_FRAME OnCloseWindow
The size is saved inside EDA_BASE_FRAME, and is done before
this function is called, so this code had no effect.
2020-05-17 00:12:49 +01:00
Ian McInerney 613c020920 Move the file history into the frames 2020-05-17 00:12:49 +01:00
jean-pierre charras fca3fb0e11 Kicad, unzip archive: allows directory creation in dir dialog.
Fixes #4461
https://gitlab.com/kicad/code/kicad/issues/4461
2020-05-16 18:30:35 +02:00
jean-pierre charras 44ea281210 tree_project_frame: in the wxFileSystemWatcherEvent event avoid adding the project
filename in tree list, because it is always the root item.
(The previous code was not taking into account the tree list root item)

Fixes #4460
https://gitlab.com/kicad/code/kicad/issues/4460
2020-05-16 13:14:41 +02:00
Jeff Young 06dea92bcb Fix issues with Kicad Manager frame and new kicad_sch files.
Fixes https://gitlab.com/kicad/code/kicad/issues/4410
2020-05-12 15:20:17 +01:00
jean-pierre charras ba1a2aceaa kicad manager: fix some issues related to new filenames extensions.
(in new project creation and save project as)

Fixes #4380
https://gitlab.com/kicad/code/kicad/issues/4380
2020-05-09 13:02:16 +02:00
Ian McInerney e4b6487fca Overhaul compiler warnings infrastructure
* Track our warnings separate from normal flags
* Remove all warnings from the SWIG code
* Add more GCC warnings
2020-05-06 01:47:20 +01: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
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
Mikołaj Wielgus 6a8ace55c4 Re-add mistakenly removed empty line in 'kicad.cpp' 2020-04-14 23:41:27 +00:00
Mikołaj Wielgus 59c971e1e1 Confirm only once when multi-deleting files
Also do not open empty popup window.
2020-04-14 23:41:27 +00: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 317e98b344 Simplify user model for editing color themes. 2020-04-08 22:34:56 +01:00
Jeff Young 0248abed6e Enable new s-expr Eeschema files in Kicad Manager window. 2020-04-07 17:29:58 +01:00
jean-pierre charras 9d2712a824 Fix a few Coverity warnings.
It also fix:

Fixes #4082
https://gitlab.com/kicad/code/kicad/issues/4082
2020-03-29 18:42:24 +02:00
jean-pierre charras 69dcee9450 Kicad manager: fix an issue on Windows when killing Kicad.
For some obscure reason, on Windows, when killing Kicad from the Windows
task manager if a editor frame (schematic, library, board editor, fp editor)
is open and has some edition to save, OnCloseWindow is run twice
*at the same time*, creating race conditions between OnCloseWindow() code.

Fixes #4072
https://gitlab.com/kicad/code/kicad/issues/4072
2020-03-25 09:26:47 +01:00
Jeff Young d69ebfae49 Push tool framework base down into TOOL_HOLDER.
This allows us to use it outside of EDA_BASE_FRAMEs (in this case, in
PANEL_PREVIEW_3D.)
2020-03-24 19:00:25 +00:00
jean-pierre charras 8245398a3e Add comments. 2020-03-22 08:16:53 +01:00
jean-pierre charras e0e4ea6223 Kicad: unzip project: fix issues:
- files with no extension were skipped.
- subdirs were ignored.
2020-03-21 14:02:54 +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
Adam Wolf ac20428b82 Add macOS KICAD_BUNDLE_LIBS search path for bundle fixup. 2020-02-26 22:10:00 -06: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
Jon Evans dc75c2b800 Factor out utility to launch a given file or folder 2020-02-20 22:07:17 -05: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
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
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
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
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
Mikołaj Wielgus c3df984c0b Project manager: fix files in nested dir not being added to hierarchy
Fixes #1945 | https://gitlab.com/kicad/code/kicad/issues/1945
2020-01-11 16:03:26 +00:00
Seth Hillbrand 7c28c3838a Comment-only changes
Makes class comments conform to coding standards
2020-01-10 16:43:01 -08:00
Simon Richter 270aaec443 Rewrite FBP files generated with unreleased wxFB
These use a few features that are too new, causing errors when trying to
edit with a released version of wxFormBuilder.
2020-01-07 13:32:33 +00:00
Ian McInerney 25a302758e Fix macos plist version string generation
Generate these resource files similar to how it is done one Linux.

Fixes mac-builder issue https://gitlab.com/kicad/packaging/kicad-mac-builder/issues/275
2019-12-26 12:42:25 +00:00
Wayne Stambaugh 18ff60fbb9 Fix build error on non-macos builds. 2019-12-22 07:38:50 -05:00
Ian McInerney 5ed074b5c5 Add missing override specifier to fix warning 2019-12-22 11:21:54 +00:00
jean-pierre charras ad32c0e5e4 Kicad, tree project: refinement in multiple selection.
When editing files, the editor is called once to open multiple files.
2019-12-06 10:16:08 +01:00
Mikolaj Wielgus 350a991f26 Allow multiple selections in Kicad project manager (starting point) 2019-12-06 09:10:20 +01:00
Seth Hillbrand b5f021ff9f Cleanup: Replace push_back with emplace_back
In cases where we create a new item and immediately push into a
container, the emplace idiom is faster and more efficient.
2019-12-05 13:41:21 -08:00
Ian McInerney 99b9354a51 Add clear recent files action to the menus
ADDED: Menu item to allow the recent file lists in each program to be
cleared

Fixes: lp:1821685
* https://bugs.launchpad.net/kicad/+bug/1821685
2019-11-23 23:35:21 +00:00
M.Scholz dbb9b5f64f Corrects IsDirWritable check
The check for IsDirWritable needs to reference the absolute path to
return correct values.

Fixes: lp:1853421
* https://bugs.launchpad.net/kicad/+bug/1853421
2019-11-21 17:23:44 -08:00
jean-pierre charras 767d7f2009 Fix bug (typo?) in gestfich.cpp.
Minor enhancement in treeproject_item.cpp
2019-11-19 16:11:56 +01:00
Ian McInerney 9114709039 project manager: Clear rename flag in the rename event handling 2019-11-17 01:51:54 +00:00
Ian McInerney c31ac6c154 Clean up code inside the project manager tree 2019-11-17 01:01:12 +00:00
Ian McInerney 7b13eb46d8 After renaming a file, select the new one 2019-11-17 00:52:43 +00:00