Commit Graph

72 Commits

Author SHA1 Message Date
Jon Evans ac1f7f93a2 Save context menu position for bus unfold
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6378
2020-12-27 13:07:16 -05:00
Jeff Young c0e5e8eeee Formatting. 2020-12-27 13:17:03 +00:00
Jeff Young e882753ebf Grid snapping fixes.
1) Uniformly honour the GAL grid snap settings
2) Make more uniform use of GRID_HELPERs
3) Smarten EDIT_LINE for mid-point snapping

Fixes https://gitlab.com/kicad/code/kicad/issues/6558
2020-12-03 19:55:58 +00:00
Jeff Young a19028a396 Hook up EE_GRID_HELPER to some more tools.
Also implements EE_GRID_HELPER layers so that connectable things
snap to connectable things and graphics snap to graphics.

Fixes https://gitlab.com/kicad/code/kicad/issues/5641
2020-12-03 15:16:34 +00:00
Jeff Young dd60fd47b2 Cleanup and formatting. 2020-11-23 01:10:08 +00:00
Jeff Young 9e9946628a Go back to arrow cursor on a cancel (or finish).
Fixes https://gitlab.com/kicad/code/kicad/issues/6421
2020-11-19 20:09:28 +00:00
Jeff Young a207bd97bb Naming conventions. 2020-11-17 16:05:49 +00:00
Jeff Young 176f461b2c Fix a corner case of wire merging.
We want to look for a junction before merging two touching colinear
segments, but the old code would also check for a junction when
merging two overlapping segments, which is not what you want.

Fixes https://gitlab.com/kicad/code/kicad/issues/5960
2020-10-21 18:51:47 +01:00
Marek Roszko b2e9f6987d Split base_struct into eda_item and eda_rect 2020-10-13 21:24:50 -04:00
Jon Evans d1bdfb7253 Clear selection before adding new lines in immediate mode
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4266
2020-10-13 19:16:48 -04:00
Marek Roszko 310786333d Add missing cursors for bus, graphic lines, and hier labels
Fix #5949
2020-10-10 18:25:44 -04:00
Ian McInerney 5aa796b5fe Cleanup compiler warnings 2020-10-10 15:24:35 +01:00
Marek Roszko f5e0754f65 Use the setCursor lambda pattern and fix up the initial cursor states 2020-10-07 23:26:14 -04:00
Mark Roszko d9485129c8 Implement more context specific cursors using both stock and custom cursors. 2020-10-08 00:50:28 +00:00
Jeff Young 4565631728 Finish moving eeschema assigned netclasses to sheet-path-relative.
Also adds code for the case where a new label is created on a net
with an existing netclass assignment.

Fixes https://gitlab.com/kicad/code/kicad/issues/5886
2020-10-07 16:31:55 +01:00
Mark Roszko c940a45937 ADDED: Autostart wires in eeschema
Allows wires to be automatically started by clicking over a connection point
2020-10-01 23:53:47 +00:00
Seth Hillbrand 4fa3de2211 Ensure we clear forced position
Fixes https://gitlab.com/kicad/code/kicad/issues/5699
2020-09-18 16:10:09 -07:00
Seth Hillbrand f493e270ea ADDED: Menu option to enable/disable snap to grid
You can now enable and disable snap to grid when drawing/editing across
all apps.  You can also tie snap to grid to the visibility of the grid
to allow rapid enable/disable via grid display.
2020-09-10 20:09:30 -07:00
Seth Hillbrand 173b4ff588 Add snapping to eeschema
This generalizes both the SetPosition() function and ORIGIN_VIEWITEM
class away from the pcbnew-centric.
2020-09-09 10:18:15 -07:00
Seth Hillbrand 02a5d47de9 Avoid passing references in EESchema
This returns the connection list by value.  This allows easier Python
use

Also renames m_End() to GetEnd()
2020-09-08 06:29:27 -07:00
Jeff Young 6e72f609f0 Make sure router and via tools update when sizes change.
Also adds a size menu to the context menu for the Via tool.

Fixes https://gitlab.com/kicad/code/kicad/issues/5321
2020-08-31 23:33:02 +01:00
Mark Roszko 1082402b33 Convert UNDO_REDO_T to an enum class 2020-08-26 18:04:32 +00:00
Jeff Young f4ab14f32d Performance improvements for SchematicCleanup().
Fixes https://gitlab.com/kicad/code/kicad/issues/4563
2020-08-10 12:41:52 +01:00
Jeff Young e910dc0092 Make sure lines/wires/busses get default widths if not spec'ed.
Fixes https://gitlab.com/kicad/code/kicad/issues/4854
2020-08-09 21:52:36 +01:00
Jeff Young 7340c97ef9 Undo for schematic-wide operations.
Editing value/footprint fields of multi-unit components.
Find/Change.
Annotation.
Back annotation.

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

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

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

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

Fixes https://gitlab.com/kicad/code/kicad/issues/3899
2020-07-13 12:32:17 +01:00
Jon Evans 4a5792cb87 Fix bus unfolding in the wake of bus entry changes
Since bus entry shape is not a thing anymore,
unfolding routine can be simplified to just use size

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4853
2020-07-09 18:51:42 -04:00
Jeff Young 3939b31027 Integration of netclasses into Eeschema.
This is mostly architecture, with the hookup of the Schematic Setup
dialog's Net Classes page.  Things like assigning to a net on the
canvas to follow.

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

Fixes https://gitlab.com/kicad/code/kicad/issues/4581
2020-07-06 20:00:50 +01:00
Ian McInerney bb1afb747a Remove bus entry shape
The shape isn't needed anymore, since bus entries can be rotated
and mirrored like other items.

Fixes https://gitlab.com/kicad/code/kicad/issues/4588
2020-06-30 02:09:33 +01:00
Jeff Young f84406009b Push a couple of layers of indirection out of grid settings. 2020-06-13 11:35:56 +01:00
Jon Evans 77a6550ba9 Fix bus unfolding with prefixes 2020-05-24 19:17:01 -04:00
Jeff Young d61b6f965e Flatten some settings and remove some more globals. 2020-05-23 16:50:33 +01:00
Jon Evans d7bd4c9b04 Move Eeschema globals to new SCHEMATIC object
Set up a new lineage for SCH_ITEMS to get back to the SCHEMATIC
they live on: Items will all be parented to the SCH_SCREEN that
they are added to, and each SCH_SCREEN will point back to the
SCHEMATIC that it is part of.  Note that this hierarchy is not
the same as the actual schematic hierarchy, which continues to
be managed through SCH_SHEETs and SCH_SHEET_PATHS.
2020-05-18 13:04:56 -04:00
Jeff Young 4a1ee40058 Pretty print bus definitions to the menus. 2020-05-13 16:26:53 +01:00
Jeff Young 2b6089240a Change super/subscript syntax to ^{foo} and _{foo}. 2020-04-18 21:04:41 +01:00
Jeff Young 9c8941e040 Remove a bunch of globals. 2020-04-16 17:34:46 +01: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 8eb15fe911 Tidy up some Coverity issues. 2020-04-07 17:29:58 +01:00
Jeff Young 591428b0d9 Remove some problematic global variables.
Fixes https://gitlab.com/kicad/code/kicad/issues/4121
2020-04-05 16:17:04 +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
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
Seth Hillbrand 03f74c87a1 Update immediate mode location and restart wires
The immediate action option clears (or not) the position of the events.
We use this to determine if the command should start at the given
position or merely activate the tool.  This was being checked in the
menu options, which only activated for tool commands in the context
menu.  Moving to the process event, we catch hotkeys as well.

This also restores the previous logic in eeschema that used a static
variable for storing wires rather than the private class variable.
Starting the draw event now picks up from the existing wires when
activated in immediate mode.

Fixes #3891 | https://gitlab.com/kicad/code/kicad/issues/3891
2020-02-11 09:12:36 -08:00
Jon Evans da222d96b1 Fix a few issues with bus unfolding
Bus submenus weren't sending events because tool wasn't set.
Net names need to be unescaped for display.
Unfolding wasn't drawing the new wire segments.
SCH_LINE_WIRE_BUS_TOOL could get caught in an infinite event handling loop.

Fixes https://gitlab.com/kicad/code/kicad/issues/3796
2020-01-21 22:02:46 -05:00
Mark Roszko 70908043a3 Convert enums inside eeschema and the symbol editor to be scoped
Scope: NETLIST_ITEM, CONNECTION_TYPE, ELECTRICAL_PINTYPE,
       NET_CONNECTION, NETLIST_ITEM, GRAPHIC_PINSHAPE

Note, the pin type enum had PT_ added to the front to prevent
shadowing of the INPUT symbol on msys2 (see discussion at
c17c9960d8)
2020-01-18 20:51:28 +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
Seth Hillbrand 6e5e453d0d Replace EESchema DLIST
This moves EESchema DLIST structures to rtree.  These changes are more
fundamental than the pcbnew changes from 9163ac543 888c01d11 d1877d7c1
and 961b22d60 as eeschema operations were more dependent on passing
drawing list references around with SCH_ITEM* objects.
2020-01-10 06:37:08 -08:00
Mark Roszko ca34ade00c Make global labels have the same spin style as net/hierarchical labels
For legacy reasons, it stored left and right "spin" as flipped integers in the file format.
But the code handled the flip in multiple locations rather than just doing it on file io.
This change unifies the internal code and does the mapping in the file I/O.
2020-01-08 19:07:55 +00:00
Jon Evans 5255a29bc0 Always use local bus member names for unfolding menu 2020-01-03 22:11:00 -05:00
Seth Hillbrand e9323fff82 Eeschema: Move SCH_LINE_WIRE_BUS_TOOL to class
The remaining static elements of SCH_LINE_WIRE_BUS_TOOL are moved into
the class and passed elements eliminated in favor of held class
elements.
2019-12-13 12:41:57 -08:00
Seth Hillbrand cda291adae eeschema: Clean bits of DLIST
Removes the extra DLIST manipulation from SCH_LINE_WIRE_BUS_TOOL and
moves the static storage into class storage
2019-12-13 11:22:18 -08:00
Jeff Young 3af3bf894c Make sure the IS_MOVED flag gets set when breaking out of a bus.
This (among other things) causes an update-preview event to be sent
when modifying it (such as rotating).

Fixes: lp:1854456
* https://bugs.launchpad.net/kicad/+bug/1854456
2019-12-02 20:01:44 +00:00