Commit Graph

274 Commits

Author SHA1 Message Date
Roberto Fernandez Bautista 7ca4f0b375 CADSTAR PCB Archive Importer: Formatting fixes 2020-09-08 21:21:21 +00:00
Roberto Fernandez Bautista 3b3af5327f CADSTAR PCB Archive Importer: Move code into common/plugins and pcbnew/plugins folders 2020-09-08 21:21:20 +00:00
Roberto Fernandez Bautista 86bf592bac ADDED: CADSTAR PCB Archive Importer
Initial commit
- Imports directly mappable layer stackup (only physical board fabrication layers for now)
2020-09-08 21:21:20 +00:00
Jon Evans 9f7bca38b3 A better way of handling standalone project files 2020-08-30 16:04:39 -04:00
Jon Evans dc7e1783b3 Make sure a project is loaded at all times
For now, much of KiCad depends on Prj() working, so when we
are asked to unload a project, immediately load the null project
so that nothing breaks.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/5374
2020-08-26 18:37:34 -04:00
Jon Evans 24435fcc62 Don't create new project files when opening boards/schematics
Display warning infobar in the board/schematic setup when no project
is loaded, since most of the settings in those dialogs are saved in
the project and not in the board/schematic file.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4868
2020-08-24 22:17:21 -04:00
Jon Evans 67a5ed15c7 Make sure appearance panel builds after project has been loaded
OnBoardChanged must run after LoadProjectSettings.
Move the local overrides to PCB_EDIT_FRAME::onBoardLoaded
so that they are run after the panel is initialized.
2020-08-24 19:39:18 -04:00
Jeff Young d41f196d7f Appearance panel must be initialized from board before setting active layer. 2020-08-24 00:49:08 +01:00
Jon Evans 6720473db9 Move net visibility/color controls to a wxGrid
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5235
Might improve https://gitlab.com/kicad/code/kicad/-/issues/5210
2020-08-23 13:15:07 -04:00
Jon Evans 0fa755ebb8 Don't refresh appearance panel until after project is loaded 2020-08-22 15:40:43 -04:00
Jeff Young 6450ee2f2c Prevent crash if board doesn't have any layers in the layer preset. 2020-08-20 00:51:16 +01:00
Jeff Young 27b047ab3f Cache project text vars as properties in the PCB board file.
Fixes https://gitlab.com/kicad/code/kicad/issues/5255

Fixes https://gitlab.com/kicad/code/kicad/issues/5005
2020-08-19 19:32:20 +01:00
Wayne Stambaugh ede39780e2 Remove all debugging output that cannot be disabled.
The use of printf, wxLogDebug, and std::err/std::out causes excessive
debugging output which makes finding specific debugging messages more
difficult than it needs to be.

There is still some debugging output in test code that really needs to
be moved into a unit test.

Add debugging output section to the coding policy regarding debugging
output.
2020-08-18 10:17:36 -04:00
Jon Evans bd14f8a82a ADDED: New appearance control widget for PcbNew
Featuring:
- Layer view presets
- Per-type opacity for tracks, vias, pads, zones
- Net and netclass color and visibility controls

CHANGED: Simplified object visibilty controls

Fixes https://gitlab.com/kicad/code/kicad/-/issues/1951
Fixes https://gitlab.com/kicad/code/kicad/-/issues/1981
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2003
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2173
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2254
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4325
2020-08-15 15:24:28 -04:00
Marek Roszko 9278660b10 Add support for the windows application restart api 2020-07-28 14:32:39 -04:00
Jon Evans a2041073ee Skip project backup in standalone mode
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4867
2020-07-12 11:42:05 -04: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 afd432e687 Infrastructure for net hiding
LoadProjectSettings changed to take place after the board
has been loaded so that board-specific project settings can
be applied (such as net visibility and color overrides)
2020-07-08 21:59:34 -04:00
Jon Evans b084305b12 Clean up some pcbnew file handling bugs 2020-07-06 21:53:28 -04:00
Jeff Young 2819570d1e Push panel_setup_netclasses down into common. 2020-07-06 20:00:50 +01:00
Jon Evans 3ebd5b317b Don't try to switch projects during autosave
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4800
2020-07-05 11:02:48 -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 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 c0aa6965de Migrate PcbNew project settings to new framework
Various architecture upgrades to support this.
Creating a BOARD now requires a valid PROJECT, which caused
some (mostly transparent) changes to the Python API internals.

ADDED: Project local settings file
CHANGED: Board design settings are no longer stored in PCB file
CHANGED: Net classes are no longer stored in PCB file
CHANGED: Importing board settings now reads boards, not just projects

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2578
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4070
2020-07-02 22:08:54 -04:00
Jon Evans a4fadfcdf2 Begin moving project file load to new system 2020-07-02 22:08:54 -04:00
Jon Evans a7708fa6dc Add PROJECT_FILE and basic load/unload methods 2020-07-02 22:08:54 -04:00
Jon Evans 09cb75b8a1 Use a temporary file when saving boards/schematics to make the operation more atomic
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4517
2020-06-19 23:31:26 +00:00
Seth Hillbrand eb89d1c68b pcbnew: Minor update to ratsnest calc
BuildConnectivity updates the ratsnest after it completes.  By compiling
the ratsnest before connectivity, we update it twice with the dirty flag
being reset after connectivity updates.
2020-06-17 19:43:11 -07:00
Seth Hillbrand 8c57821e9b pcbnew: Move ratsnest items to separate folder 2020-06-16 11:15:14 -07:00
Jeff Young 160981ee71 Better error reporting for DRC rule parsing. 2020-05-25 22:51:47 +01:00
jean-pierre charras 91b9e928dc minor code cleanup. 2020-05-25 12:06:27 +02:00
Jeff Young 0aaccfbb28 Save hole-to-hole-min to file. 2020-05-19 20:48:47 +01:00
Jeff Young cec857c0f4 Complete hookup of zone filler to new clearance engine. 2020-05-18 19:20:46 +01:00
Ian McInerney 613c020920 Move the file history into the frames 2020-05-17 00:12:49 +01:00
Ian McInerney 99dcadf7e6 Introduce new KI_FALLTHROUGH macro
Annotate purposeful fallthroughs in switch statements with the
KI_FALLTHROUGH macro.
2020-04-25 00:44:09 +01:00
Jeff Young fd6dffe170 Only save changed severities etc. if the modify bit is set.
(Also means we need to set said bit when changing them.)

Fixes https://gitlab.com/kicad/code/kicad/issues/4164
2020-04-24 23:09:10 +01:00
Thomas Pointhuber b707c84b62 Use Record handling for parsing
Now, we know how big a record is, and should be able to parse all boards without missing bytes?
2020-04-03 23:22:24 +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
Jon Evans 28222d3bd0 Use existing pcb filename for Save As where possible 2020-01-06 14:26:03 +00:00
Ian McInerney b9d8849b28 Unify unsaved changes detection logic in all frames
Create an IsContentModified() function in each frame
that provides if the content has been modified, and
use that instead of always copying the checks.
2019-12-19 15:34:01 +00:00
Ian McInerney f7ded3040c pcbnew: Modify new file to have a better prompt when closing old board
CHANGED: The new file prompt now asks to save the board if needed

Fixes: lp:1853338
* https://bugs.launchpad.net/kicad/+bug/1853338
2019-11-24 14:51:29 +00:00
jean-pierre charras 6f2cbe5982 Pcbnew: housekeeping: move netlist code to netlist_reader sub directory. 2019-11-17 13:58:38 +01:00
Jeff Young 6179dfde37 Default keep upright to false in design settings.
The board file only writes out a token if it's true, so the value
must default to false.

Fixes: lp:1845883
* https://bugs.launchpad.net/kicad/+bug/1845883
2019-10-02 10:56:13 +01:00
jean-pierre charras b25ffc0aa8 Pcbnew, layer manager: fix flicker when loading a file, and incorrect size on start when no file is loaded
Fixes: lp:1840591
https://bugs.launchpad.net/kicad/+bug/1840591
2019-08-19 10:42:22 +02:00
Jeff Young 562ab0bdea Move layer defaults and diff-pair dimensions to board file. 2019-07-06 00:04:54 +01:00
Jeff Young 8f84c3ec4f Grid rid of GetCanvas/GetGalCanvas distinction now that there's only gal. 2019-06-13 19:58:37 +01:00
Jeff Young 0ea75cb4e7 Another attempt to fix build failure. 2019-06-04 16:26:45 +01:00
Jeff Young ea3c29e3ec Now that we allow multiple 3DViewers, we need to make sure we have the right one.
Note that FindWindow() searches children, whereas FindWindowByName() searches
all windows.
2019-06-04 13:56:54 +01:00
Jeff Young 3912c7407f Move global commands to ACTIONs.
Also fixes a crash bug opening Edit Tracks and Vias dialog.
2019-06-03 21:08:30 +01:00