Commit Graph

316 Commits

Author SHA1 Message Date
Jeff Young 25209516a6 Adjust net highlighting after edits.
Fixes: lp:1800291
* https://bugs.launchpad.net/kicad/+bug/1800291
2019-05-12 18:20:41 +01:00
Jeff Young 7995b5cc3c Restore selection on abort and undo/redo.
Also includes a related bug fix to not create an undo record for
the initial schematic cleanup.

Fixes: lp:1825975
* https://bugs.launchpad.net/kicad/+bug/1825975
2019-05-11 15:38:49 +01:00
Jeff Young c1539ae014 Naming changes to reflect sharing between SchEdit and LibEdit. 2019-05-10 19:56:20 +01:00
Jeff Young f3c95ad83c Clean up the RepeatItem architecture and finish deleting the UndoItem facility. 2019-05-10 19:56:20 +01:00
Jeff Young ea0941cab3 Implement modern tools for LibEdit. 2019-05-10 16:11:57 +01:00
Jeff Young 469231ae15 Move Pin, Symbol Text and Symbol Anchor to modern toolset. 2019-05-07 20:39:46 +01:00
Jeff Young cd2bd23c37 Fix a bunch of issues with hotkeys, IDs and event processing.
Fixes: lp:1827894
* https://bugs.launchpad.net/kicad/+bug/1827894
2019-05-06 21:42:00 +01:00
Jeff Young a42a4b0b52 Implement immediate bus unfold and add bus unfold to selection context menu. 2019-05-05 17:14:30 +01:00
Jeff Young 32765ebffd Do some refactoring in prep for sharing some sch tools with libedit. 2019-05-05 17:14:30 +01:00
Jeff Young ed0e6af66d Move to direct tool registration.
It was confusing that the primary frames registered their tools
differently than the other frames.  In addition, since the other
frames also added their own tools, foo_actions::RegisterAllTools()
didn't really register all tool but rather those used by the
principal frame (PCB_EDIT_FRAME, SCH_EDIT_FRAME, etc.)
2019-05-05 17:14:30 +01:00
Jeff Young 4ccfa17ff9 Fix bugs in sheet duplicate & copy/paste.
Don't edit sheet during AddToScreenAndUndoList() call.  If it's
cancelled and we delete the item, callers will still own pointers
to the freed memory.  Do it in New and Paste instead.
2019-05-05 17:14:30 +01:00
Jeff Young bcdc3ad90a Set IS_NEW flag on new images. And a bunch of cleanup of dead code. 2019-05-05 17:14:30 +01:00
Jeff Young 21b315f2af Finish removing GetCurItem() from eeschema. 2019-05-05 17:14:30 +01:00
Jeff Young 6e695aac25 Move bus unfold and symbol unit selection to modern toolkit. 2019-05-05 17:14:30 +01:00
Jeff Young f4b92e6acf Refactor as SCH_DRAWING_TOOL was getting too big. 2019-05-05 17:14:30 +01:00
Jeff Young 1e5334f5d4 Implement DeMorgan conversions in modern toolset. 2019-05-05 17:14:30 +01:00
Jeff Young 7c54fc9c46 Cleanup. 2019-05-05 17:14:30 +01:00
Jeff Young c09817e08c Context menus for labels. 2019-05-05 17:14:30 +01:00
Jeff Young a61bbea4bd Fix issue with selection being inadvertantly cleared via ClearFlags().
Also fixes an undo bug when pick-component-rotate-place-undo.
2019-05-05 17:14:30 +01:00
Jeff Young bbd8659f69 Implement explicit cross-probing (mainly for sheets which are too slow to do automatically).
Also moves the message panel updaters to SCH_INSPECTION_TOOL.
2019-05-05 17:14:29 +01:00
Jeff Young 1ff7869ec3 Move Edit with Symbol Editor to modern toolset context menu. 2019-05-05 17:12:59 +01:00
Jeff Young 902be18a04 More modern toolset context menu work.
Text/label type changes and bus entry shape changes.  And some
context menu bug fixing.
2019-05-05 17:12:59 +01:00
Jeff Young 42383ae871 Build out some of the modern toolkit context menus. 2019-05-05 17:12:59 +01:00
Jeff Young da988428cf Add modern toolset cut/copy/paste. They now use the system clipboard. 2019-05-05 17:12:59 +01:00
Jeff Young 2bd4a1b58c Implement properties dialogs in modern toolset. 2019-05-05 17:12:59 +01:00
Jeff Young de347998d1 Implement drag in modern toolset. 2019-05-05 17:12:59 +01:00
Jeff Young 4e0208dfba Move duplicate item and block to modern toolset. 2019-05-05 17:12:59 +01:00
Jeff Young 1c8461bec7 Transition mirroring to modern toolset. 2019-05-05 17:12:59 +01:00
Jeff Young f200c61897 Start transitioning block operations to modern toolset. 2019-05-05 17:12:59 +01:00
Jon Evans c054944d67 Set real-time connectivity to on by default with a safety valve 2019-04-29 18:59:32 -04:00
Jeff Young e476cfcec5 Move SPICE tools to modern framework. 2019-04-25 22:58:58 +01:00
Jeff Young d281f051ed Move eeschema delete tool to modern toolset. 2019-04-23 14:19:55 +01:00
Jeff Young 1a007c3e4b Implement SCH_SELECTION_TOOL (but still with legacy semantics). 2019-04-22 22:08:18 +01:00
Jeff Young a461eae8b9 Fix 100s of usages of GetFlags() which conflated != 0 with being edited.
While this was true long ago, many flags have been added since which
have nothing to do with editing (HIGHLIGHTED, BEGIN_ONPAD, etc.)
2019-04-22 09:58:06 +01:00
Jeff Young d88126e519 Tidy up and fix end sheet command. 2019-04-19 01:00:54 +01:00
Jeff Young cc18464f8f Move sheet drawing and resizing to modern toolset and fix some bugs.
Fixes: lp:1825204
* https://bugs.launchpad.net/kicad/+bug/1825204
2019-04-18 18:19:12 +01:00
Jeff Young 0772b54845 Move eeschema zoom-selection to modern toolset.
Fixes: lp:1825164
* https://bugs.launchpad.net/kicad/+bug/1825164
2019-04-17 21:49:50 +01:00
Jeff Young c88fd514a0 Implement drawing tools in modern toolset.
Fixes: lp:1825192
* https://bugs.launchpad.net/kicad/+bug/1825192
2019-04-17 21:49:50 +01:00
Jeff Young 460909ea9a Move click-to-place tools to modern toolset. 2019-04-16 16:20:52 +01:00
Jeff Young 32c86a4ca4 Move place symbol to modern toolset. 2019-04-16 16:20:51 +01:00
Jeff Young b63fab92cf Move Eeschema net highlighting to modern toolset. 2019-04-14 12:10:48 +01:00
Jeff Young 94a948fdd1 Move grid selection for both Eeschema and Pcbnew to COMMON_TOOLS. 2019-04-13 18:43:35 +01:00
Jeff Young fc7f5630c7 Move eeschema zoom operations to modern toolset. 2019-04-13 18:43:26 +01:00
Seth Hillbrand 94470f7da6 eeschema: Avoid modifying the schematic in undo
OnModify() is called when staging the undo/redo modifications.  This
requires  that it not create changes that themselves need to be placed
in the undo/redo stack
2019-04-13 07:11:24 -07:00
Seth Hillbrand d70ae19cb8 eeschema: Move realtime connectivity to adv config
This allows realtime connectivity testing by modifying the
kicad_advanced setting rather than recompiling
2019-04-12 08:37:44 -07:00
Jeff Young 3c11b89e4c Hook up refresh buttons to library tree synchronisation.
Fixes: lp:1820057
* https://bugs.launchpad.net/kicad/+bug/1820057
2019-04-11 19:45:10 +01:00
Jon Evans 3b46253056 Add profiling to SchematicCleanUp portion of connectivity calculations 2019-04-10 23:29:17 -04:00
Seth Hillbrand 8c9244e677 Revert "eeschema: Connectivity threading"
This reverts commit 1a031e771f.

Some nets broken in commit.
2019-04-10 20:08:42 -07:00
Seth Hillbrand 1a031e771f eeschema: Connectivity threading
This threads the first step (update item) in the connectivity routine.
Also eliminates the duplicate call for multiple copies of the same
sheet.
2019-04-10 15:04:22 -07:00
Jeff Young 77f15eeeaf Support synchronous messaging over KIWAY EXPRESS.
This allows us to make the various netlist and pcb update routines
more atomic and less reliant on carefully sequenced asynchronous
messages.

This is also a prelude to adding support for footprint testing
without a netlist.
2019-04-08 13:26:09 +01:00
Jeff Young 2aad4a5e57 Remove dead code from removal of eeschema legacy canvas. 2019-04-05 15:54:31 +01:00
Jon Evans 8a9b82c2a2 Switch CONNECTION_GRAPH to wxLogTrace 2019-04-02 22:58:11 -04:00
Michael Kavanagh fe6bc411dd Fix 'hokey' -> 'hotkey' typo 2019-04-02 12:57:26 -04:00
Jeff Young 3da5396c8d Fixes for importing board setup properties.
Save/restore default netclass.
Read layers back in with correct syntax ('.' between keyword and layer name).
Write layers to project file.
Read/write layer enablement bits.
Don't set solder paste margin min to 0 (most of them are negative).

Fixes: lp:1811990
* https://bugs.launchpad.net/kicad/+bug/1811990
2019-04-01 13:23:37 +01:00
Jon Evans f1882f333e Don't call OnModify() before placing new parts
Remove unnecessary calls to TestDanglingEnds()

Disable real-time connectivity updates for now

Revert "Remove unnecessary calls to TestDanglingEnds()"

This reverts commit d93e3894f2bcd6239862ac9eae0cb2f994b9d52a.

Remove debug code
2019-03-31 19:58:08 -04:00
Jon Evans 3c714f1d8c Fix undo handling of SchematicCleanUp 2019-03-31 19:55:57 -04:00
Jon Evans 5cf82f1a9e Begin refactoring netlist creation 2019-03-31 19:55:12 -04:00
Jon Evans 83c7e7fc65 New connectivity algorithm and bus upgrades
Bus upgrades: core new connectivity code

Bus upgrades: eeschema integration and modifications

Bus upgrades: eeschema dialogs

Bus upgrades: netlist export

Bus upgrades: file format changes
2019-03-31 19:53:41 -04:00
Seth Hillbrand 078320e2fb Unify and correct Autosave functions
Autosave was not working correctly, partly due to different
implementations in eeschema and pcbnew and partly due to a mistaken
refactor at some point during v5 development.  This unifies the expected
autosave prefix to _autosave- for both pcbnew and eeschema.  It also
unifies the expected suffix for the backup files to -bak.

Fixes: lp:1820433
* https://bugs.launchpad.net/kicad/+bug/1820433
2019-03-18 10:25:26 -07:00
jean-pierre charras bec2d7861e Eeschema: shows the opened sheet info in title bar.
Fixes: lp:1819564
https://bugs.launchpad.net/kicad/+bug/1819564
2019-03-15 13:09:04 +01:00
Wayne Stambaugh 5315d1be22 Eeschema: fix an option toolbar refresh bug.
For some reason, changing languages was causing the options (left) toolbar
to get redrawn with some of the main toolbar entries.  Changing the window
size causes the toolbar to be redrawn correctly.  The normal call to
function wxWindow::Refresh() does not.

Fixes lp:1816492

https://bugs.launchpad.net/kicad/+bug/1816492
2019-02-25 13:26:14 -05:00
Jeff Young 40dac0ecbb Default sizes for edit frames in case prefs get deleted.
Fixes: lp:1807676
* https://bugs.launchpad.net/kicad/+bug/1807676
2018-12-10 12:23:16 +00:00
jean-pierre charras ab3ff61faa Eeschema: adjust the working/drawing area size on the page size.
This makes using Scrollbars more easy to use, especially for "small" page sizes like A or B.
Note also the working/drawing area size is bigger than the page size (3 times)
2018-11-20 15:11:22 +01:00
Jeff Young 6860320b1b Init LibEdit with unit & conversion when opening from schematic. 2018-11-08 21:27:15 +00:00
Jeff Young fec8ab372e Don't set the viewport when switching screens.
That's the job of ZoomAutomatique().

Fixes: lp:1799436
* https://bugs.launchpad.net/kicad/+bug/1799436
2018-11-04 19:17:53 +00:00
jean-pierre charras 3bf1dd7671 Eeschema, Hierarchical sheet: fix missing pen width call in draw function.
The hierarchical sheet was drawn (outline and texts) with a line thickness
that in fact the line thickness of the previously drawn item.
2018-10-25 15:12:34 +02:00
Jeff Young 4524dce9bb Tie up some loose ends from JP's SHEET_PIN fixes.
Fixes: lp:1799606
* https://bugs.launchpad.net/kicad/+bug/1799606
2018-10-24 22:00:50 +01:00
jean-pierre charras dc21a60531 Fix incorrect management of SCH_SHEET_PIN items when adding or removing them.
Especially new SCH_SHEET_PIN items were added twice, thus creating crashes.

Fixes: lp:1799606
https://bugs.launchpad.net/kicad/+bug/1799606
2018-10-24 16:19:28 +02:00
Jeff Young 8a54b1b3b7 Add view refresh calls for edit operations.
Note that the bug referenced in the "fixes" section is only one
of many addressed by this commit.

Fixes: lp:1798449
* https://bugs.launchpad.net/kicad/+bug/1798449
2018-10-18 12:12:48 +01:00
Jeff Young 254e9f4a7e Implement HardRedraw for eeschema and libedit. 2018-10-17 12:14:09 +01:00
Jeff Young c19984e4de Performance optimization for Symbol Fields Editor. 2018-10-17 02:04:44 +01:00
Jeff Young 08e1379671 Add new sheet pins to view. 2018-10-16 22:54:12 +01:00
Jeff Young 1114b5cfa9 Refresh item when its dangling state changes.
Fixes: lp:1797996
* https://bugs.launchpad.net/kicad/+bug/1797996
2018-10-16 17:07:59 +01:00
Tomasz Włostowski d66e0d4f7a eeschema-gal: implemented EnableDepthTest() in GAL, fixed drawing order in eeschema 2018-10-15 00:09:59 +02:00
jean-pierre charras f283667fb0 add option to switch between opengl and cairo in eeschema (step 1) 2018-10-09 11:08:56 +01:00
Jeff Young 97c83766db Refresh issues around sheet pins. 2018-10-09 11:08:56 +01:00
Jeff Young ca3751fbbb Add GAL refresh for some more commands and remove unused DC params. 2018-10-09 11:08:56 +01:00
Jeff Young 268565ee41 Refresh component when children change. 2018-10-09 11:08:56 +01:00
Jeff Young 37cfa3fed9 Cleanup unused and redundant stuff. 2018-10-09 11:08:56 +01:00
jean-pierre charras e55763947e Set the reight grid visibility at start. Display axis in libedit and viewlib. 2018-10-09 11:08:56 +01:00
Jeff Young 269e8159d4 Grid settings for LibEdit. 2018-10-09 11:08:55 +01:00
Jeff Young 9e9db3afe5 Start an empty document with a reasonable grid size. 2018-10-09 11:08:55 +01:00
Jeff Young afeebc8944 Grid settings for Eeschema GAL.
Split antialiasing options out from display options.  Move
antialiasing to common.  Duplicate the rest of display options
for Eeschema.

Implement OnSelectGrid and hookup GAL canvas refresh to
SetPresetGrid.

Add Grid Settings... to View menu and move Show Grid from
preferences to View Menu to match Pcbnew.
2018-10-09 11:08:55 +01:00
Tomasz Wlostowski 90c7c60471 eeschema-gal: initial GALified version. Lots of stuff still to do! 2018-10-09 11:08:52 +01:00
Jeff Young 533b26e8a1 Add hotkey for viewing symbol datasheet.
Also fixes a bug when there are multiple datasheets to choose from.

Fixes: lp:1793978
* https://bugs.launchpad.net/kicad/+bug/1793978
2018-09-24 15:46:45 +01:00
Jeff Young 02a3f83040 Implement poor-man's RTTI for use over KiWAY.
Fixes: lp:1777883
* https://bugs.launchpad.net/kicad/+bug/1777883
2018-09-15 20:06:42 +01:00
Jeff Young 3f23e9ac46 Don't use nullprt for a dialog's parent.
Fixes: lp:1791561
* https://bugs.launchpad.net/kicad/+bug/1791561
2018-09-14 10:21:45 +01:00
jean-pierre charras 181ce46b91 Eeschema: fix incorrect references clearing for shared sheet paths.
Previously, when creating a new instance of a sheet, the full set of references
was cleared.
Moreover, if this sheet has sub-sheets, the annotation was incorrectly handled

Now only (and all) new sheet path(s) created have a reference cleared, as expected.
(new sheet paths can be more than one, if the new instance of the sheet has sub-sheets)

Fixes: lp:1789048
https://bugs.launchpad.net/kicad/+bug/1789048
2018-09-04 12:36:38 +02:00
Seth Hillbrand d0ea844557 eeschema: Close ERC before placing components
We have a dialog shim that raises the ERC dialog in front of the
schematic frame, which is useful for keeping the ERC dialog visible
during debugging.  But mouse move events do not pass through to the
schematic, resulting in a captured mouse pointer but no drawing updates.

As a work-around we close the ERC dialog while placing new components.
Previous ERC data still exist when the window is launched again.

Fixes: lp:1779851
* https://bugs.launchpad.net/kicad/+bug/1779851
2018-08-28 16:03:43 -07:00
Jeff Young 86a801aabc Allow updating of file history size on the fly.
Also updates the file menu IDs so that we can actually handle
more than 9 items in the file history.

Also adds configurable file history length to the other gerber
files (zip, drill and job).

Fixes: lp:1745729
* https://bugs.launchpad.net/kicad/+bug/1745729
2018-08-21 10:34:41 +01:00
Jeff Young 4b1a31ffad Regularize save-changes dialogs. 2018-08-12 00:02:37 +01:00
Jeff Young d81faa72c9 Overhaul border drawing in all the Kicad frames.
Primary change is to replace most control/window borders with
AUI pane borders.  We implement our own AUI border drawing
routine which avoids the ugly one-pixel white frames around
dark canvasses.

Also increases the signal-to-noise ratio of all the pane
creation code in the various frames.
2018-08-11 17:25:38 +01:00
jean-pierre charras d2eb9e0735 Eeschema, Dialog annotate: fix incorrect management that creates a crash when try to open it a second time.
Fixes: lp:1786618
https://bugs.launchpad.net/kicad/+bug/1786618
2018-08-11 17:19:24 +02:00
Jeff Young d8d4f75fa1 Fix button order and genralize Exit dialog so it can be shared more.
This also fixes a bunch of bugs where an error during save would
still close the window (rather than cancelling the close action).

Fixes: lp:1785034
* https://bugs.launchpad.net/kicad/+bug/1785034
2018-08-02 11:01:03 +01:00
Jeff Young 1bca706115 Move search status messages to Find/Replace dialog.
Fixes: lp:1777699
* https://bugs.launchpad.net/kicad/+bug/1777699

(cherry picked from commit 1ae8a2b)
2018-07-17 15:13:37 +01:00
Jeff Young 6a7e6e7735 Fix a few more missing language-change updates.
Fixes: lp:1779513
* https://bugs.launchpad.net/kicad/+bug/1779513

(cherry picked from commit 8389c5c)
2018-07-17 15:13:27 +01:00
Jeff Young 7841f8a466 Unified preferences dialog framework.
(cherry picked from commit 8ee3e77)
2018-07-17 15:11:17 +01:00
Jeff Young cb925a6646 Output defined default fields to netlists & BOMs.
Fixes: lp:1746814
* https://bugs.launchpad.net/kicad/+bug/1746814
2018-05-24 18:24:59 +01:00
Jeff Young 6e83f99c72 Relax fully-annotated constraint for BOM editor.
Also fixes a bug where unannotated components would get references
of the form R-1 (because their reference number was -1).

Fixes: lp:1768814
* https://bugs.launchpad.net/kicad/+bug/1768814
2018-05-11 12:33:44 +01:00
Jeff Young d0d9bb25c0 Menu consistence (add Config Paths to LibEdit). 2018-05-03 15:07:24 +01:00
Simon Richter 7e47ef7471 Fix warnings for unreferenced local variables 2018-04-18 15:08:37 -04:00
Carsten Schoenert a11714b1a4 fix misspelled 'an other' -> 'another' 2018-04-08 13:24:37 -04:00
jean-pierre charras e750417fa0 Eeschema: fix many wxASSERT when trying to open menus from the main menubar.
This is due to the fact the same ID was used for menuitems in menubar,
and tools in toobars.
Especially, some items were not compatible due to different attributes.

Windows does not accept the same ID for 2 items inside the same frame.
It creates issues (items not shown, Asserts, ...)
2018-04-01 20:58:27 +02:00
Jeff Young 3d32ee774e Translatable strings must be ASCII7 for translation tools. 2018-03-12 19:54:07 +00:00
Jeff Young 4eedb3a27d The _() macro affords some nullptr safety over a naked immediate.
Fixes: lp:1477448
* https://bugs.launchpad.net/kicad/+bug/1477448
2018-03-12 19:18:05 +00:00
Tomasz Wlostowski b1f613071d eeschema: workaround for 64kByte string length limit in wxString::Format() causing segfaults in netlist update under Windows
Fixes: lp:1754402
* https://bugs.launchpad.net/kicad/+bug/1754402
2018-03-12 18:26:25 +01:00
jean-pierre charras 17f6d09935 Page layout editor: fix incorrect management of block operation in context (popup) menu. 2018-03-11 18:38:27 +01:00
Maciej Suminski 1f09990618 Remove not used ListNets() methods 2018-03-04 18:04:19 +01:00
Russell Oliver 9016344bb3 Eagle Schematic Import: Fix netlist mapping for zones and vias. 2018-03-04 16:45:11 +01:00
Jeff Young 447fd1bf02 Add a start number to annotate.
This also makes the dialog modeless so that one switch between
sheets while annotating to choose the base numbers for each
sheet (assuming they don't like the base number we pick because
of the order of the sheets).

Fixes: lp:1154131
* https://bugs.launchpad.net/kicad/+bug/1154131
2018-02-19 09:32:54 -05:00
Jeff Young d67ceea568 Set current sheet number when only annotating a single sheet.
Fixes: lp:1750096
* https://bugs.launchpad.net/kicad/+bug/1750096
2018-02-18 21:12:07 -05:00
Jeff Young b3884669cf Proper error reporting for Annotate dialog.
Also fixes:
- forcing the annotation scope to "full schematic" when run
  as a prerequisite to Generate Netlist.

- a long-standing bug where displaying extra items in a dialog
  would mess up the height of the HTML_REPORT_PANEL (becasue
  we were setting the html window's height rather than its
  parent flexgrid.

- initializing the annotation radio buttons to safe values
  (full schematic and keep existing)

Fixes: lp:1750062
* https://bugs.launchpad.net/kicad/+bug/1750062
2018-02-18 15:08:24 -05:00
Maciej Suminski 43523a6179 Options for board update KiWay request (MAIL_SCH_UPDATE[_REQUEST])
Board update KiWay request may now contain options in the message
payload:
- "no-annotate": do not enforce annotation
- "quiet-annotate": annotate without displaying a dialog
- "by-reference": update netlist by reference, no dialog displayed
- "by-timestamp": update netlist by timestamp, no dialog displayed
2018-02-16 19:37:23 +01:00
Jeff Young 4bae901dc8 Centralize zoom-to-fit code.
Fixes a bunch of errors:
- libedit and libbrowser would zoom to bounding box but centre on canvas
- libedit, libbrowser and gerbview didn’t take the scroll bars into account
- pcbnew didn’t take scroll bars into account or apply the 10% margin
- appending a board file would re-centre, but not re-zoom

Fixes: lp:1504302
* https://bugs.launchpad.net/kicad/+bug/1504302
2018-02-13 20:06:03 -05:00
jean-pierre charras 8022f1cc01 fix code after renamin files 2018-01-30 11:49:51 +01:00
jean-pierre charras 833d6223a0 rename files 2018-01-30 11:08:03 +01:00
Renamed from eeschema/schframe.cpp (Browse further)