Commit Graph

185 Commits

Author SHA1 Message Date
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
Mark Roszko 686b768a3d Add shutdown blocking on Windows for pcbnew, eeschema and pleditor
ADDED: Block shutdown/logoff on Windows when contents have been modified
2019-12-19 14:11:11 +00:00
Ian McInerney 3ca231aa78 Rename lib viewer frame files to use the class name 2019-12-19 14:05:46 +00:00
jean-pierre charras d9de28de35 Eeschema: usability enhancement.
ADDED: a config option to select (when clicking on a pin) the parent symbol
or only the pin.

Previously, when cliking on a pin, the parent symbol was selected.

Allowing the pin selection is mandatory in cross probing, and to display the pin
characteristics in some cases, for instance if a pin is flagged by the ERC tooL.
2019-12-19 12:41:51 +01: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
Wayne Stambaugh d4cea0f2b7 Eeschema: fix multiple sheet file name bugs.
Add missing check for root sheet when searching sheet hierarchies for
already loaded schematics.  This prevents the root sheet from being
omitted when adding new sheets using the root sheet file name.

CHANGED: Make file name tests case sensitive so that schematic sheet
file names on non-Windows systems can be uses as expected.

Warn users when attempting to use schematic file names that only vary
by case sensitivity that doing so will result in a project that is not
portable to Windows.

Fixes lp:1843415

https://bugs.launchpad.net/kicad/+bug/1843415
2019-11-18 07:59:30 -05:00
Ian McInerney 39ef514ff9 Eeschema: Don't give a default filename to schematics in standalone
CHANGED: No longer call schematics noname.sch in standalone mode,
instead don't given them any name so the user can choose on save.

Fixes: lp:1852607
* https://bugs.launchpad.net/kicad/+bug/1852607
2019-11-15 11:29:57 +00:00
Jeff Young 7a8f2a5623 Simplify eeschema's plot filename algorithm.
We have different requirements than sheet paths for netlists,
so going through that code and then doing a lot of conversions
just ends up with a mess.

We now generate the path directly from the SCH_SHEET_PATH.

Fixes: lp:1852353
* https://bugs.launchpad.net/kicad/+bug/1852353
2019-11-13 19:16:09 +00:00
Jeff Young 9d288968e7 Be more explicit about extent of schematic cleanups.
The new connectivity algorithm had a tendency to cleanup
globally, but that could insert undo records from other sheets
into the current screen's undo stack.  Needless to say, this
was a recipie for segfaults.

Fixes: lp:1846247
* https://bugs.launchpad.net/kicad/+bug/1846247
2019-11-10 23:25:54 +00:00
jean-pierre charras 9d617502d5 Gerbview: fix missing grid initialization at starting. 2019-10-03 18:33:16 +02:00
Jeff Young 0b981caef8 Don't clear the IS_MOVED flag right before looking at it.
Fixes: lp:1842355
* https://bugs.launchpad.net/kicad/+bug/1842355
2019-09-12 14:45:01 +01:00
Jeff Young 2553dd2942 Bail on our custom dockart provider.
It appears that it was causing some crashes, and it was never clear
that it looked better anyway.
2019-09-06 23:38:20 +01:00
Jeff Young 10c25a2290 Update frame type enum to match current class names. 2019-09-06 23:38:20 +01:00
Jeff Young 3bd38ec245 Improve zoom-to-extents for footprints with long text.
Fixes: lp:1820540
* https://bugs.launchpad.net/kicad/+bug/1820540
2019-09-05 21:02:29 +01:00
Jeff Young bbe5146bbb Refresh items which may have had their dangling state changed.
While it's tempting to look at the changed flag that TestDanglingEnds
returns, it's insuficient as the connectivity algorithm might have
already updated it (and ignored the changed flag).

Fixes: lp:1835107
* https://bugs.launchpad.net/kicad/+bug/1835107
2019-08-21 15:35:02 +01:00
Jeff Young fb3aa446e1 Remove Run Simulator command from Export Spice Netlist.
Also cleans up the Export Netlist dialog to be more platform compliant.

Fixes: lp:1591777
* https://bugs.launchpad.net/kicad/+bug/1591777
2019-08-04 16:25:36 -06:00
Wayne Stambaugh 8789ab9265 Eeschema: remove rogue symbol libraries from project file.
Check for symbol libraries that somehow ended up in the project file
after remapping occurred and remove all of them to prevent potentially
broken symbol library links.

Add nagware dialog to warn the user and a checkbox to never show the
dialog again.

Fixes lp:1838185

https://bugs.launchpad.net/kicad/+bug/1838185
2019-08-01 13:26:21 -04:00
Jeff Young 3904d7ccfc Push some search stuff down into EDA_DRAW_FRAME so it can be shared.
Also rewrites the PCBNew Find dialog to make use of the above, including:
1) searching in user-defined footprint fields
2) searching in pcb text
3) a history list in the search popup
4) case sensitive searching
5) word sensitive searching
6) the ability to turn wildcard searching on/off
7) better placement of the result when the dialog obscures part of the
window

Fixes: lp:1838006
* https://bugs.launchpad.net/kicad/+bug/1838006
2019-07-26 17:53:32 -06:00
jean-pierre charras 858db3c104 Synchronize toolbars state with current options after rebuilding them.
Previously, for instance after modifying preferences or language,
they were rebuilt but the tools state was not set due to a missing call to SyncToolbars() after rebuilding.
2019-07-20 18:16:35 +02:00
jean-pierre charras 1b5e1cd4d2 Fix complements the fix b428d74: make best zoom taken in account immediately. 2019-07-20 14:26:46 +02:00
Jeff Young e816a0c29d Push Eeschema & PLEditor PICKER_TOOLs down into common.
Also implements a more robust push/pop tool strategy for pickers.
2019-07-16 00:44:01 +01:00
Jeff Young 34894acb89 Don't try to copy a null item.
Fixes: lp:1836126
* https://bugs.launchpad.net/kicad/+bug/1836126
2019-07-11 18:23:32 +01:00
Jeff Young d03041b565 Cleanup. 2019-07-02 21:36:42 +01:00
jean-pierre charras 31c254d8c1 SCH_EDIT_FRAME::FixupJunctions(): avoid flagging schematics as modified, when no junction is added. 2019-06-25 18:23:28 +02:00
jean-pierre charras 1cc05f19b5 SCH_EDIT_FRAME::FixupJunctions(): do not change the opened sheet after running the code. 2019-06-25 17:30:37 +02:00
Jeff Young f088d4d762 Add env-var setting to CommonSettingsChanged().
Fixes: lp:1804925
* https://bugs.launchpad.net/kicad/+bug/1804925
2019-06-25 11:34:28 +01:00
Seth Hillbrand 98124e68c7 Update exit strategy to match UI guidelines
In singletop mode, all frames show the "Quit" option in the file menu
and will quit on Ctrl-Q.  When launched from the main KiCad interface,
sub-programs show the "Close" option instead and will close with Ctrl-W.
In this mode, Ctrl-Q will instruct the main program to exit.

Fixes: lp:1779938
* https://bugs.launchpad.net/kicad/+bug/1779938
2019-06-24 21:46:42 -07:00
Tomasz Włostowski d7fe307913 eeschema: automatically insert junctions at pin connections if needed during file load
EEschema optimizes wires by merging colinear segments. If a schematic opened without a valid
cache library or missing installed libraries and later saved, this optimization can cause connectivity
errors. In order to fix that we check each pin-wire connection and junctions if necessary.
2019-06-25 01:06:25 +02:00
jean-pierre charras 710a82bc51 Eeschema: fix an issue in netlists when using "<root sheet>" as root sheet path name.
Netlists do not accept any char in netnames (especially spice).
They must use only "/" as root sheet path name.

Especially _( "<root sheet>" ) breaks netlists because:
- there is a space in name, and special chars (< and >)
- it is a translatable name. so the actual name cannot be managed.
- most of netlist code in Kicad expects a "/" as root path.
2019-06-23 19:37:41 +02:00
jean-pierre charras e1a2cbbea1 Eeschema: fix for root sheet plot filename, in non English languages. 2019-06-20 17:00:06 +02:00
Wayne Stambaugh 7235da0979 Eeschema: fix sheet plotting bug.
Prefix the sheet name with "Sheet: " and the sheet file name with "File: "
when plotting so that it matches the display sheet rendering.

Improve the root sheet plot file name.

Fixes lp:1832081

https://bugs.launchpad.net/kicad/+bug/1832081
2019-06-17 17:01:05 -04:00
Jeff Young 4eab89d9ef Fix OSX button order issue in Unsaved Changes dialog.
Also changes the presentation of the string when the checkbox appears
so that the "Changes will be lost" warning isn't hidden by the turndown.
This last part may require conditional compilation as it's undocumented.

Lastly, regularizes the Unsaved Changes strings between the apps.
2019-06-17 17:01:57 +01:00
Jeff Young 909aeba3d9 Transition some more stuff from the MVC view to the controller. 2019-06-16 19:53:30 +01:00
Jeff Young c7bfa9857e Use more reflective naming of what the tool does. 2019-06-16 19:52:07 +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 ce1f35a1be Cleanup some left-over vestiages of the legacy canvas architecture. 2019-06-13 15:51:32 +01:00
Seth Hillbrand e52afd93a3 Remove Legacy options for overlay/context
These options were used to support the legacy canvas when drawing on
MacOS and GTK3.  With the move to 100% GAL, they are extraneous.  This
moves all DC over to "COPY" as we only use this for printing support in
Eeschema at the moment, so there is a single draw command (no erasing)
for the canvas.
2019-06-12 06:01:03 -07:00
Jeff Young b3e30e50c8 Cleanup. 2019-06-10 23:46:01 +01:00
Jeff Young 5e49517781 Move hotkeys to ACTION architecture. 2019-06-10 23:46:00 +01:00
Jeff Young e606587ff6 Move remaining Symbol Tree ctx menu cmds to ACTIONS.
Also moves the various Player instantiators down into COMMON_TOOLS
for better sharing.
2019-06-10 23:46:00 +01:00
Jeff Young 1ea001d497 Go back to event-loop zooming for new frames.
The immediate mode appears to have made things worse not better.
2019-06-04 13:56:54 +01:00
Jeff Young 1bf04d1722 More ACTIONs work. 2019-06-04 00:51:16 +01:00
Jeff Young 568c8c336b Move DRC control to a tool; move assorted commands to ACTIONS. 2019-06-03 21:08:30 +01:00
Jeff Young 9f1e2e34b7 Move some dupicated tools to common tools. 2019-06-03 21:08:30 +01:00
Jeff Young e517199794 Move ConfigurePaths and LibTable management to common ACTIONs. 2019-06-03 21:08:30 +01:00
Jeff Young 7f1ed30ff5 Move DeMorgan handling to ACTIONs. 2019-06-01 23:03:24 +01:00
Jeff Young 39b91c90dd Moved more operations to ACTIONs. 2019-06-01 23:03:24 +01:00
Jeff Young 3777c5270b Move some more Eeschema operations to ACTIONs. 2019-06-01 16:29:12 +01:00
Jeff Young c2662b0e11 Retire EDA_DRAW_PANEL and legacy_wx/EDA_DRAW_FRAME. 2019-05-31 21:55:30 +01:00
Jeff Young d6e9bdf07b Convert remaining legacy drawing code to print code. 2019-05-31 21:54:22 +01:00