Commit Graph

685 Commits

Author SHA1 Message Date
Michael Kavanagh de03d3d427 Application title bar: app name after filename
Fixes https://gitlab.com/kicad/code/kicad/issues/2096
2020-09-03 06:35:48 -07:00
Jeff Young 34d069ffd8 Bubble cancel up from app to kicad manager when closing.
Fixes https://gitlab.com/kicad/code/kicad/issues/5402
2020-08-31 11:49:29 +01:00
Ian McInerney a0d84e94fd Use move to trash to the project manager instead of immediate delete
CHANGED: Delete in the project manager now moves files to the trash can

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2499
2020-08-28 23:00:43 +00:00
Jon Evans cd54ba7b01 Fix project unloading in LoadProject
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5380
2020-08-26 20:46:20 -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 3673c23696 Code style 2020-08-23 22:10:05 -04:00
Mark Roszko 89e74140eb Save file / window states for kicad project locally 2020-08-24 02:01:14 +00:00
Seth Hillbrand 1e315bc3fe pcbnew: Add "Select All" Action to pcbnew and fpedit
Fixes https://gitlab.com/kicad/code/kicad/issues/2497
2020-08-20 16:07:10 -07:00
Jeff Young 9e40db9faf Sort footprint position files with rest of project items. 2020-08-20 13:41:50 +01:00
Ian McInerney 4491f24d5e Ripout the old SyncToolbars infrastructure reminants
The tool framework no longer needs to request updates of the UI
state for the controls, wxWidgets will do it for us.
2020-08-16 19:10:26 +00:00
Ian McInerney 45fb030b9b Rename and shorten the names in ACTION_CONDITIONS 2020-08-16 19:10:25 +00:00
Ian McInerney 72a1c71e07 Implement a framework to handle wxUpdateUIEvents for tool actions
This allows for the tool framework to keep track of a universal
set of conditions for the UI state (enabled/checked/shown) for
controls of actions. It removes the need for the main menubar
menus to be CONDITIONAL_MENUs and be rebuilt on each open,
and instead makes the updates of the check and enabling of
items handled in the native wxWidgets way.

This commit switchs the 3d viewer and kicad project manager window
over to this system.
2020-08-16 19:10:25 +00:00
Ian McInerney 0975f3817a Fix project handling in eagle project import and ensure the titlebar is correct
Previously it didn't properly close or create a new project for the
Eagle project.

Also, update the titlebar text whenever the project changes (so it is
cleared properly when a project is unloaded).

Fixes https://gitlab.com/kicad/code/kicad/issues/5152
2020-08-16 12:37:51 +01:00
Marek Roszko c36080a250 Immediate fix to prevent crashing, don't call ClosePlayers twice
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5164
2020-08-12 18:35:18 -04:00
Ian McInerney c458b50fd9 Ensure the environment variables are synchronized between KiCad and Python
Before this, the environment variables inside Python wouldn't reflect
the updates to them made after the interpreter was started in Pcbnew.
This will call into Python and set the variables when they are changed,
since Python can't synchronize itself when running in an embedded
interpreter.

Fixes https://gitlab.com/kicad/code/kicad/issues/5071
2020-08-09 19:56:12 +01:00
Jon Evans 43ab43ec9e Fix a few issues with Close Project
A new empty project needs to be reopened for now
Footprint info cache write only works with a project for now
2020-08-09 11:13:50 -04:00
Jeff Young c992570427 Add Open Python directory to menus.
Fixes https://gitlab.com/kicad/code/kicad/issues/5115
2020-08-09 15:39:51 +01:00
Jon Evans e4c20e0ac9 Fix leftover modification of file history 2020-08-09 10:16:22 -04:00
Ian McInerney 30d42ca95a Save the open projects into the settings before closing the project
Saving in the frame destructor is too late, because all projects
have been closed so the list being saved is empty.
2020-08-08 23:41:48 +01:00
Ian McInerney 226e5205c4 Load the previous project if an empty string is the argument
Previously it would just not open any project at all. This
was a problem for some launchers, which would pass an empty string
when no file is passed by the user.

Fixes https://gitlab.com/kicad/code/kicad/issues/5055
2020-08-08 23:41:48 +01:00
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
Jon Evans 79e40cf765 Fix a few issues with Close Projects MR
Store list of previously open projects only in kicad.json
Keep all management of open projects in SETTINGS_MANAGER

Also add kicadSettings() for convenience
2020-08-08 16:00:49 -04:00
Fabien Corona bc357dff8a Add "Close project"
Allow the user to close a project from the project manager.
Distinguish the open project from the file history.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4964
2020-08-08 18:52:14 +00:00
Jon Evans dcc484e114 CHANGED: Library editors are now usable with no project loaded
Fixes https://gitlab.com/kicad/code/kicad/-/issues/3688
2020-08-07 18:02:34 -04:00
Jeff Young dd7d8218f0 Handle multiple-selections for kicad manager context menu.
Fixes https://gitlab.com/kicad/code/kicad/issues/5080
2020-08-06 19:38:06 +01:00
Jeff Young c3f8f57cd5 Remove folder menu items from sub-projects in Kicad manager frame.
Fixes https://gitlab.com/kicad/code/kicad/issues/5080
2020-08-05 23:06:42 +01:00
Marek Roszko 9278660b10 Add support for the windows application restart api 2020-07-28 14:32:39 -04:00
jean-pierre charras 5ef50ab27a Kicad manager: cosmetic fixes: fix incorrect bitmaps in Kicad manager tree file.
Use the right bitmap for .gbr and .gbrjob files.
2020-07-23 14:07:26 +02:00
Jon Evans a107f7ce5b Fix a few issues with legacy project loading
- Prevent crash on project tree for "Empty project" item
- Correctly handle loading of legacy projects in tree view
- Fix an issue where legacy projects would not get saved

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4944
2020-07-20 19:39:59 -04:00
Ian McInerney 8d73be7d30 Delete tool dispatcher in KICAD_MANAGER_FRAME
Not deleting this is a memory leak.
2020-07-20 11:31:34 +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
jean-pierre charras 6296b4e20b Kicad manager: create a minimal .kicad_pro file when creating a project from scratch.
Fixes #4889
https://gitlab.com/kicad/code/kicad/issues/4889
2020-07-16 11:31:39 +02:00
Seth Hillbrand e19a7910f8 Revert "Revert "Set DoubleBuffering to reduce flicker""
This reverts commit c18cab6154.
2020-07-13 20:19:10 -07: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 570cc61b3f Give kicad manager frame a tool dispatcher
Without this, tool hotkeys don't work. Also need to make sure
that the log text field doesn't get initial focus.

I am a bit confused about how this was working on other
platforms besides Windows...

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4801
2020-07-11 16:18:54 -04:00
Seth Hillbrand c18cab6154 Revert "Set DoubleBuffering to reduce flicker"
This reverts commit 106259f6e6.

In its place, we set double buffering to only menubars in an attempt to
find a soluton to #4785

Fixes https://gitlab.com/kicad/code/kicad/issues/4863
2020-07-11 09:43:30 -07: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
Ian McInerney f3e44fb029 Fix showing new formats in project tree
* Differentiate between new JSON and old project files
* Show both old and new schematic files in the tree
2020-07-07 23:12:17 +01:00
Jon Evans 6eca886292 Fix some UTF8 issues with project settings
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4808
2020-07-05 12:26:14 -04:00
Jon Evans 860e58432b Add new project files to archiver 2020-07-03 08:31:41 -04:00
Jon Evans 96b91e65ea Use updated extension for file history 2020-07-02 22:32:56 -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 b592a4169f Update project template system for new format 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
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 0e2f9cb1bd Migrate CvPcb project parameters 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
Ian McInerney fb10406e67 Add right-click context menus for toolbar items 2020-06-26 21:29:03 +00:00
Ian McInerney 52856a8ce4 Move scaled toolbar separator into ACTION_TOOLBAR
* Ensure all separators are scaled separators
* Clean up toolbar creation functions
2020-06-26 21:29:03 +00:00