Jeff Young
f113370e1e
Edit worksheet properties when no other selection is available.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4044
2020-04-21 21:17:59 +01:00
Jeff Young
a286cb5a8f
Keep labels on dragged wires.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/2107
2020-04-19 18:24:39 +01:00
Jeff Young
2b6089240a
Change super/subscript syntax to ^{foo} and _{foo}.
2020-04-18 21:04:41 +01:00
Jeff Young
42cd604c3c
Expose Show Hidden Fields to GUI.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/2010
2020-04-18 16:36:51 +01:00
Jeff Young
d7d1cb6f78
A bunch of fixes to Eeschema Find/Replace.
2020-04-18 14:43:08 +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
c82679a6f2
Fix crash bug when highlighting no net (found by Coverity).
2020-04-12 11:19:44 +01:00
Jeff Young
292a9fadd9
Allow a click in the value field when searching for power nodes.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4180
2020-04-11 23:51:00 +01:00
Jeff Young
c4994eee7b
Fix a pair of bugs in the new highlight net logic.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4180
2020-04-11 13:02:18 +01:00
Jeff Young
962aa73e12
Improve EE_COLLECTOR to not miss children of sheets or symbols.
...
Also implements pin highlighting and special cases for power symbols.
Fixes https://gitlab.com/kicad/code/kicad/issues/4180
2020-04-10 14:09:26 +01:00
jean-pierre charras
cb7263d017
Eeschema: fix ERC dialog not shown after a double click, when recalled by tool ERC.
...
(the dialog was reactivated by calling Raise(), but this is not enough: Show()
must be called also, at least on Windows).
Fix also a minor wxWidgets alert in ERC dialog.
Fixes #4171
https://gitlab.com/kicad/code/kicad/issues/4171
2020-04-08 10:03:51 +02:00
Jeff Young
8eb15fe911
Tidy up some Coverity issues.
2020-04-07 17:29:58 +01:00
jean-pierre charras
1027c2fb8d
Eeschema: when placing a symbol, and after placing others instances of the symbol
...
deselect the previously placed items.
Otherwise, the changes (rotation, mirroring...) made during placing the current symbol
are applied to other previously placed items.
This is obviously not what is wanted, and creates crashes in Eeschema.
Fixes #4163
https://gitlab.com/kicad/code/kicad/issues/4163
2020-04-06 13:00:58 +02:00
Jeff Young
cc9ac37a0e
Add text variable support to envVar processing.
2020-04-05 20:52:26 +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
20c00cbb21
Finish off "busses" -> "buses".
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4144
2020-04-02 18:27:05 +01:00
jean-pierre charras
e811101567
fix a few Coverity warnings.
2020-04-01 09:34:44 +02:00
Jeff Young
132d4d3ffa
Clean up compiler warning.
2020-03-30 14:15:59 +01:00
Jeff Young
4990d1e7b2
Variable substitution framework.
...
This implements editing of variables and moving SCH_FIELDs,
TEXTE_MODULEs, TEXTE_PCB and worksheet items over to the new
framework.
2020-03-30 14:15:59 +01:00
Jeff Young
5134856f18
Rationalise 3D settings data-structure.
...
Move the camera out to its own so that everything else is board-
related, and then rename BOARD_ADAPTER.
At some point the flags should probably be moved out too, and they
can have the EDA_3D_SETTINGS name.
2020-03-28 16:09:40 +00:00
jean-pierre charras
615deb40f3
Eeschema: move, mirror and rotate block: fix some issues.
...
Fixes #4111
https://gitlab.com/kicad/code/kicad/issues/4111
2020-03-28 13:17:59 +01:00
Jeff Young
ba36fc0009
Fix some Coverity issues.
2020-03-25 14:38:43 +00: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
Alexander
cf25975876
EEschema: Fix back annotation
...
Repairs back annotation after some schematic code modifications
2020-03-24 10:53:00 +00:00
Jeff Young
66382db7dd
Add some defensive code for selection anomalies.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4021
2020-03-21 20:55:50 +00:00
Jeff Young
204f2cd580
Reference -> reference designator.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4012
2020-03-17 16:09:25 +00:00
Jeff Young
cee973dc04
Move ERC error reporting over to the new framework.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/1989
2020-03-16 11:06:15 +00:00
Jeff Young
085d80e3f3
Remove duplicated settings from preferences.
...
These have now moved to project-specific settings.
2020-03-13 17:28:53 +00:00
Jeff Young
dc9882c3b9
Fix a few bugs with Sheet field dragging and rotating.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4046
2020-03-12 13:57:29 +00:00
Jeff Young
437f888c25
Schematic Setup dialog.
...
Includes:
- moving some of the project settings from the Preferences dialog
- ERC severites
- project-specific field-name templates
Fixes https://gitlab.com/kicad/code/kicad/issues/2145
2020-03-10 18:54:17 +00:00
Jeff Young
535033c5c9
Enable editing of sheet fields.
2020-03-07 18:52:30 +00:00
Jeff Young
fe3e0307d8
Move sheet name and filename to SCH_FIELD architecture.
...
Only internal storage architecture has changed (so far).
2020-03-06 16:23:44 +00:00
jean-pierre charras
b7cd0c54c2
Fix compil issues, especially on Windows:
...
Replace SEVERITY_ERROR by RPT_SEVERITY_ERROR to avoid collision with a system definition.
Replace other SEVERITY_XXX by RPT_SEVERITY_XX for consistency.
Fix compil warnings and some other compil issues.
2020-03-04 10:48:18 +01: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
Seth Hillbrand
20fde2c16f
eeschema: Fix find from RTree change
...
The RTree doesn't keep pins and fields in the tree, so we need to search
for them differently.
Fixes #3979 | https://gitlab.com/kicad/code/kicad/issues/3979
2020-03-03 09:35:12 -08:00
Simon Richter
866aac9737
Clean up a few unused names of caught exceptions
2020-03-01 00:33:45 +00:00
Jeff Young
3f31d48b5e
Use a more friendly method of ensuring unique sheet names.
...
Also fixes a bug where we were failing to respect the
forceKeepAnnotations flag when processing content nested in
a sheet.
Fixes https://gitlab.com/kicad/code/kicad/issues/3681
2020-02-29 00:07:57 +00:00
Ian McInerney
d5ceb8252e
Clean up some warnings
2020-02-28 00:06:52 +00:00
Seth Hillbrand
245b778454
libedit: Fix speed of lib check
...
The symbol check output the HTML message for each item. This is _very_
slow and can lock the system reponsiveness. Changing to a queue/flush
method is much faster
2020-02-27 15:06:48 -08:00
Jeff Young
c7ec110fba
Only center focused items when they're not visible.
...
This includes outside the window and behind an occluding dialog.
This keeps the view from jumping around when focusing on nearby
objects.
2020-02-24 23:19:17 +00:00
Jeff Young
c68b554c8e
Promote PathsAndReferences from wxArrayString to first-class-citizen.
...
Keeping the data in an un-serialized format greatly simplifies usage,
and should make it more robust.
2020-02-24 23:19:17 +00:00
Jon Evans
41f59ab873
Avoid intermittent compiler crash in GCC 7.4
...
Somehow the previous way this statement was written can cause an
internal compiler crash on gcc 7.4.0-1ubuntu1~18.04.1 sometimes.
2020-02-22 21:26:48 -05:00
Jeff Young
ea025a35e5
Change KUUID to KIID.
2020-02-21 22:20:42 +00:00
Jon Evans
e8e3b4f11e
Rename UUID to KUUID to fix MSVC build
...
Also add another newly-required boost flag
2020-02-20 22:07:17 -05:00
Jeff Young
129042f8a6
Convert timestamps to UUIDs.
2020-02-20 21:29:52 +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
jean-pierre charras
2ca16c0b29
eeschema: fixes some issues related to translated and not translated field names.
...
When searching for fields, the code was sometimes comparing translated and not translated names.
This is an issue for mandatory fields, in non English languages.
Translated field names should be used only in messages.
2020-02-16 17:52:53 +01:00
Jeff Young
2017389f2d
Pinning for library trees in FPEditor and SymbolEditor.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/2288
2020-02-14 00:10:40 +00: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
jean-pierre charras
ba9dedaaf3
Eeschema, point editor: constraint corners of a SHEET symbol to stay on 50 mil grid
...
Fixes #3867
https://gitlab.com/kicad/code/kicad/issues/3867
2020-02-07 10:06:01 +01:00
Ian McInerney
b1240b5b1e
Gracefully shutdown tools when frames are closed
...
If the tools are not gracefully exited, then the stack variables are
never destroyed, so variable lifetime issues can occur.
Fixes https://gitlab.com/kicad/code/kicad/issues/1753
2020-02-05 22:23:24 +00:00
Seth Hillbrand
7d64527eeb
eeschema: Handle Rebuild for subcomponents
...
The parents are the only items that live in the RTree, so the rebuild
check needs to recurse into the sub structure to check for selection
Fixes https://gitlab.com/kicad/code/kicad/issues/3858
2020-02-04 22:49:43 -06:00
Jon Evans
ac875e26a8
Fix handling of SCH_PINs on multi-unit parts
...
Fixes https://gitlab.com/kicad/code/kicad/issues/3770
2020-02-04 11:51:29 +00:00
Seth Hillbrand
9f7e0ef8e8
eeschema: Remove Bus-Bus and Place sheet pin buttons
...
Cleaning toolbars of functions that are superfluous or do not match well
to the user workflow.
2020-02-04 04:39:26 -06:00
jean-pierre charras
b8108d294f
Fix a few I18n messages, and minor wxWidgets alerts.
2020-02-01 14:06:56 +01:00
Alexander Shuklin
3d0b3a51f3
Eeschema: Adding back annotation
...
ADDED: Back annotation algorithm,
eeschema back annotation dialog
CHANGED: added some minor helper methods to SCH_REFERENCE_LIST and SCH_REFERENCE,
split SCH_REFERENCE_LIST::CheckAnnotation on 2 parts to reuse code
2020-01-29 16:33:57 +00:00
Seth Hillbrand
84a697060f
Don't insert pins/text when moving
...
Pins and component fields belong to the parent object and need to be
avoided when moving to prevent re-insertion on update.
Fixes #3804 | https://gitlab.com/kicad/code/kicad/issues/3804
Fixes #3811 | https://gitlab.com/kicad/code/kicad/issues/3811
2020-01-25 09:30:51 -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
Seth Hillbrand
40f97b55c7
Remove confused dynamic_cast
...
dynamic_cast could not resolve the cast chain leading to a null undo
point. Since we know the item to be LIB_ITEM, we can use static_cast
anyway and avoid the overhead.
Fixes #3771 | https://gitlab.com/kicad/code/kicad/issues/3771
2020-01-16 06:17:04 -08:00
Ian McInerney
33a40e788b
Add missing null check to library viewer control tool
2020-01-13 14:40:55 +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
Ian McInerney
960b553a70
Cleanup type casting in EE toolbase
...
* Ensure the lib edit undo checks for pointer validity
* Assert that the frames are the correct type (satisfies coverity)
* Convert C casts to C++ casts
2020-01-12 19:47:13 +00:00
Seth Hillbrand
84d5d6c168
Eeschema: Return null in case of canceling placement
2020-01-11 17:02:55 -08:00
Jeff Young
3d8150032f
Fix some uninitialized variables found by Coverity.
2020-01-11 21:29:25 +00:00
Seth Hillbrand
7c28c3838a
Comment-only changes
...
Makes class comments conform to coding standards
2020-01-10 16:43:01 -08:00
Jeff Young
88eab8134e
Fix a couple of uninitialized variables (from Coverity scan).
2020-01-11 00:11:31 +00:00
Jeff Young
8abfc13053
Fix possible null dereference (from Coverity scan).
2020-01-10 22:32:50 +00:00
Seth Hillbrand
77c60d9655
Remove the last vestiges of dlist
...
It served us (mostly) well for more than a decade. It helped KiCad grow
before the std:: came into decent shape or speed. It was a good little
list.
RIP DLIST 2008-2020
2020-01-10 06:37:08 -08: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
Ian McInerney
13b6028e1b
Refactor all math into a new kimath library
...
* Split up the thirdparty code into the thirdparty folder (#3637 )
* Create a new kimath static library containing all the math functions
This is part of cleaning the build system for #1906 .
2020-01-07 17:12:59 +00:00
Jon Evans
5255a29bc0
Always use local bus member names for unfolding menu
2020-01-03 22:11:00 -05:00
Jon Evans
d5a80e9cfd
Fix shadowing warning
2020-01-03 18:52:46 -05:00
Franck Jullien
ea218bc722
eeschema: Allow hierarchy navigator to stay open
...
ADD: User can now decide to keep the hierarchy navigator open while working
on a schematic.
This behavior can be configured in eeschema->preferences->eeschema->Editing options.
2020-01-03 21:08:40 +01:00
Ian McInerney
81292d2bf1
eeschema: Cleanup processing for multiple line editing
2020-01-03 19:30:29 +00:00
Ian McInerney
079423c3cc
eeschema: Remove unused include of eeschema_id.h
2020-01-03 16:04:54 +00:00
Mark Roszko
b84fe2b703
ADDED: Editing style of multiple graphical lines at the same time.
...
Provides the ability to quickly set the style of multiple lines. This is only allowed if the selection includes _only_ graphical lines.
2019-12-31 04:05:51 +00:00
Jeff Young
e85701f405
Don't allow IS_NEW flag on created-line-segments to fool us.
...
When dragging we'll create new line segments between selection-edge
objects and things outside the selection that they're attached to.
These new lines have their IS_NEW flags set, but shouldn't fool us
into thinking that the selection contains pasted (or placed) items.
2019-12-28 11:58:33 +00:00
Jeff Young
87e163945e
Items added to a selection for a drag should only be temporary.
...
After the drag, cancel, or undo, only the originally-selected items
should remain selected.
2019-12-28 11:58:33 +00:00
Mark Roszko
19ceb11ae7
Change more enums over to scoped enums
2019-12-28 00:55:11 +00:00
Mark Roszko
d3edeaec50
Fix "Properties" not appearing in right click menu for graphic line.
2019-12-26 15:15:34 +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
jean-pierre charras
a049348576
Eeschema: fix null pointer use.
...
Fixes #3694 | https://gitlab.com/kicad/code/kicad/issues/3694
2019-12-19 09:11:34 +01:00
Wayne Stambaugh
2b920ffa04
Symbol editor: inheritance symbol editing bug fixes.
...
There is no need to create a new root symbol and re-parent all derived
symbols when renaming a root symbol. Just rename the buffered root
symbol.
Test for duplicate symbol names when validating the properties dialog
information to prevent broken symbol pointers.
Fix a field drawing bug when editing derived symbols.
Fix bug to insure duplicate symbol names cannot exist in a library.
Fixes kicad/code/kicad#3654
Fixes kicad/code/kicad#3672
2019-12-16 10:11:06 -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
Wayne Stambaugh
20836261d7
Fix minor coding policy violations.
2019-12-12 14:55:35 -05:00
Wayne Stambaugh
a18d7a8495
Eeschema: fix a selection bug created in commit bec87864
.
...
Apparently the schematic and symbol library editors now have common
selection filtering so checking for a valid LIB_EDIT_FRAME when
filtering for the schematic editor frame prevented all schematic
object from being selected.
2019-12-12 11:42:11 -05:00
Wayne Stambaugh
bec878640c
Symbol editor: fix crash caused by broken root symbol name.
...
The symbol editor selection criteria did not include LIB_FIELD objects
which allowed the root symbol name to be changed causing broken derived
symbol links. Disable the symbols fields from being edited when a
derived part is shown in the editor to prevent this.
Add a missing warning that deleting a root symbol used to derive other
symbols would also delete all derived symbols from a library. Give the
user a chance to cancel the delete operation in this case.
Fixes kicad/code/kicad#3654
2019-12-12 10:45:12 -05:00
Wayne Stambaugh
8e150521a2
Fix a few minor symbol library inheritance bugs.
...
Don't clobber value file when load aliases in legacy symbol library cache
parser.
Use actual symbol library LIB_PART pointer rather than a flattened copy
of the symbol. This fixed a bug when displaying the parent field in the
message panel for derived symbols.
Simplify the flatten code by copying the parent and updating the lesser
information from the inherited symbol.
2019-12-06 11:33:52 -05:00
Wayne Stambaugh
54f066fed7
Implement simple inheritance for library symbols.
...
This change completely removes the LIB_ALIAS design pattern an replaces
it by allowing LIB_PART objects to inherit from other LIB_PART objects.
The initial implementation only allows for single inheritance and only
supports the mandatory fields in the derived part because that is all
that the current symbol library file format will support. Once the new
file format is implemented and saving to the old file format is deprecated,
more complex inheritance will be added. The LIB_ALIAS information saved
in the document files was move into the LIB_PART object. This change
impacts virtually every part of the schematic and symbol library editor
code so this commit message is woefully incomplete.
REMOVE: Removed the symbol aliases concept from the schematic and symbol
editors and the symbol viewer.
NEW: Replace the symbol alias concept with simple inheritance that allows
a library symbol to be derived from another library symbol.
2019-12-06 11:33:52 -05: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
Seth Hillbrand
ffcf3b01fc
Fixup issue with adding junctions
...
Segfault when we pass a component to the routine as it expects to see a
selection.
2019-11-27 11:13:01 -08:00
Franck Jullien
a5f8340654
eechema: add junction if needed when component is placed
...
Fixes: lp:1849376
* https://bugs.launchpad.net/kicad/+bug/1849376
2019-11-26 19:23:02 -08:00
Ian McInerney
087a90cf99
eeschema: Update titlebar when searching schematics
...
Fixes: lp:1851641
* https://bugs.launchpad.net/kicad/+bug/1851641
2019-11-24 01:25:00 +00:00
Ian McInerney
7339eb31eb
eeschema: Allow bus entry labels to rotate and mirror
...
Fixes: lp:1853079
* https://bugs.launchpad.net/kicad/+bug/1853079
2019-11-23 23:35:21 +00:00
Jeff Young
fb52124426
Fix several issue with bus entry connectivity.
...
When dragging a bus the entry is connected to the bus so the wire
connected to the entry (if any) needs to stretch.
While an entry can connect in the middle of bus, it cannot connect
in the middle of a wire.
Fixes: lp:1849973
* https://bugs.launchpad.net/kicad/+bug/1849973
2019-11-18 11:36:30 +00:00
Ian McInerney
1df7b718d9
eeschema: Allow labels to rotate on bus unfold
2019-11-15 20:43:56 +00:00
Seth Hillbrand
42f5c944b3
libedit: When pasting keep original multi-unit
...
Copy/Paste should keep the original items' designation for all units and
conversion type. If it was specified in the original copy, we should
keep the same specification when pasting (but update for the current
frame)
2019-11-12 16:11:08 -08: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
Seth Hillbrand
81ce588a00
eeschema: Set sheet unit number when setting unit
...
The auto increment needs to ensure the unit number is updated in two
places. Hierarchy and draw list.
Fixes: lp:1851431
* https://bugs.launchpad.net/kicad/+bug/1851431
2019-11-05 14:04:01 -08:00
Jeff Young
984c64677e
Hook up rotate & flip to bus entries when drawing them.
...
Also adds support for the bus entry shape hotkeys while drawing.
Fixes: lp:1849967
* https://bugs.launchpad.net/kicad/+bug/1849967
2019-11-05 17:22:51 +00:00
Seth Hillbrand
bbf355a12f
eeschema: Fix an issue with duplicate timestamps
...
Duplicating into a non-clone still doesn't get a new timestamp, so we
need to explicitly set it.
2019-10-29 16:48:19 -07:00
Seth Hillbrand
868ff5bb2c
Right click gets a new object if the mouse has moved
...
Right click is a pointing operation combined with a request for the
context menu. We need to highlight the user's intended object when they
have moved their mouse to a new element instead of showing the context
menu for the selected object.
However, in cases where the selection is difficult to make, it is
sometimes helpful to select the item first, then right-click. In these
cases, we keep the selection where the mouse remains inside the selected
object's bounding box.
2019-10-29 16:11:06 -07:00
Seth Hillbrand
7b2d6ab40e
eeschema: Allow mult-part placement option
...
When placing a new component in the schematic, this allows the user to
iterate through all units in the selected component without re-opening
the choose part dialog. It also allows the optional addition of
multiple copies of the same component to be placed in the schematic.
Fixes: lp:1806217
* https://bugs.launchpad.net/kicad/+bug/1806217
2019-10-29 12:20:14 -07:00
Seth Hillbrand
e533ea4ae6
eeschema: Keep selection with only components
...
Adding a field to a selection changes the bounding box and count for
rotation. This can cause odd offsets when the field is rotated against
the selection center rather than the bounding box as well as with the
component.
Fixes: lp:1849078
* https://bugs.launchpad.net/kicad/+bug/1849078
2019-10-28 10:50:26 -07:00
Seth Hillbrand
080275b4ee
Cleanup wire merge code
2019-10-18 20:15:29 -07:00
Seth Hillbrand
92011d91d2
eeschema: Testing for static/dynamic cast failure
2019-10-18 15:29:26 -07:00
Seth Hillbrand
363281dd4d
eeschema: add junction when needed for broken wire
...
The break wire command will break all wires at a point. If there are
multiple crossing wires, we need to check to see if a junction might be
required to reflect the new connection.
Fixes: lp:1848450
* https://bugs.launchpad.net/kicad/+bug/1848450
2019-10-17 12:22:57 -07:00
Jeff Young
d9336e9f97
Reset autoplace flag when a field is moved with respect to its component.
...
Fixes: lp:1843929
* https://bugs.launchpad.net/kicad/+bug/1843929
2019-10-01 15:31:52 +01:00
Seth Hillbrand
f2bf9fa534
eeschema: Prevent crash on move/drag re-entry
...
Restarting a move/drag operation breaks the stack by starting the tool
without popping it on exit.
TODO: implement RAII for these stack push/pop
2019-09-11 17:01:16 -07:00
Jeff Young
1a375a1e71
Better handling of SPICE current probe statements.
2019-09-10 11:07:47 +01:00
Jeff Young
f21e24cd17
Fix pin rotatation and SPICE current probe statement for 2-pin symbols
...
Fixes: lp:1843159
* https://bugs.launchpad.net/kicad/+bug/1843159
2019-09-08 22:54:49 +01:00
Jeff Young
44a1cf9f1b
Implement quiet-mode for selection clearing.
...
Also adds comments for exising quiet-mode calls.
Fixes: lp:1843177
* https://bugs.launchpad.net/kicad/+bug/1843177
2019-09-08 19:45:35 +01:00
Jeff Young
0ff20c18a3
More direct selection handling.
...
Fixes: lp:1842750
* https://bugs.launchpad.net/kicad/+bug/1842750
2019-09-07 20:52:17 +01:00
Jeff Young
3996a490a1
Re-allocating a std::vector invalidates its iterators.
...
When we add enough SHEET_PINs that the vector has to grow, it
re-allocates the vector causing our for-loop to get its knickers
tied in a knot.
Fixes: lp:1842394
* https://bugs.launchpad.net/kicad/+bug/1842394
2019-09-04 11:50:56 +01:00
Jeff Young
8bbbc66e46
Another attempt to fix the crash-on-selection bug.
...
Fixes: lp:1842394
* https://bugs.launchpad.net/kicad/+bug/1842394
2019-09-03 22:29:05 +01:00
Jeff Young
54a85cfaa2
Not everything in a VIEW_GROUP is an EDA_ITEM.
...
Fixes: lp:1842394
* https://bugs.launchpad.net/kicad/+bug/1842394
2019-09-03 17:24:50 +01:00
Jeff Young
efbc802f4d
Fix sheet rotation issues.
...
1) When sheet pins are on 3 or more sides there's no point in switching
the orientation to vertical.
2) Careful that we don't cause the sheet to walk when rotating and the
sheet-name or file-name is longer than the side it's on.
Fixes: lp:1841714
* https://bugs.launchpad.net/kicad/+bug/1841714
2019-09-02 22:36:55 +01:00
Jeff Young
fc50ddda64
Implement Paste Special for eeschema.
...
Also changes the normal paste behaviour to only clear annotations
when a collision is found.
Fixes: lp:1837002
* https://bugs.launchpad.net/kicad/+bug/1837002
2019-09-02 19:24:29 +01:00
Jeff Young
5e353e8967
Fix another case of selection getting out of sync with dragged items.
...
Use a big hammer this time.
Fixes: lp:1839780
* https://bugs.launchpad.net/kicad/+bug/1839780
2019-08-31 20:23:06 +01:00
Jeff Young
33625dbd9d
Add support for cut/paste of unsaved sheet content.
...
Fixes: lp:1841801
* https://bugs.launchpad.net/kicad/+bug/1841801
2019-08-30 21:56:57 +01:00
Jeff Young
71c7bf3274
Avoid ghosting items in original location when pasting.
2019-08-29 23:56:16 +01:00
Jeff Young
02a7a79e0d
Use resolved path when trying to load sheet content.
...
Also, if it can't be loaded then at least initialize it so that we
don't crash later (trying to access a NULL screen).
Fixes: lp:1841801
* https://bugs.launchpad.net/kicad/+bug/1841801
2019-08-29 23:56:16 +01:00
Jeff Young
bc450853ae
More robust solution for adding dragged items to selection.
...
Fixes: lp:1839780
* https://bugs.launchpad.net/kicad/+bug/1839780
2019-08-29 23:56:16 +01:00
Seth Hillbrand
83b2332f1f
eeschema: Check for proper type before dereference
...
When bundling a selection, we need to ensure that we have correct types
before attempting to dereference.
Fixes: lp:1841919
* https://bugs.launchpad.net/kicad/+bug/1841919
2019-08-29 08:47:26 -07:00
Seth Hillbrand
0d3f6a4930
eeschema: Remove Save All
...
Saving individual parts of a schematic can break the schematic. This
moves the schematic save option to save all sheets rather than just the
current sheet.
Fixes: lp:1840383
* https://bugs.launchpad.net/kicad/+bug/1840383
2019-08-27 20:21:02 -07:00
Jeff Young
5348f88a8f
Add sheet pins to candidate list by hand (as they're not in the view).
...
Fixes: lp:1841555
* https://bugs.launchpad.net/kicad/+bug/1841555
2019-08-27 21:08:36 +01:00
Jeff Young
a5a237ac32
Improve readability of flag checking.
2019-08-27 19:23:07 +01:00
Jeff Young
49a0907c55
Force deletion of junctions which were selected.
...
Fixes: lp:1841456
* https://bugs.launchpad.net/kicad/+bug/1841456
2019-08-27 19:23:07 +01:00
Jeff Young
b109aba663
Add a file browser to the Sheet Properties dialog.
...
Fixes: lp:1840459
* https://bugs.launchpad.net/kicad/+bug/1840459
2019-08-26 00:45:34 +01:00
Jeff Young
23fd4b64dd
Remove curly braces from netname escaping context.
...
They're now used for bus definition control characters.
Also fixes the sheet pin edit dialog to correctly escape/unescape
netnames.
Fixes: lp:1840834
* https://bugs.launchpad.net/kicad/+bug/1840834
2019-08-22 10:53:39 +01:00
Jeff Young
cc93d82025
Don't drop selection until unfold net has been chosen.
...
Fixes: lp:1831466
* https://bugs.launchpad.net/kicad/+bug/1831466
2019-08-21 15:35:02 +01:00
Jeff Young
a25368cc6b
Improve spelling.
...
The groundwork here is thanks to kunda1.
Fixes: lp:1831510
* https://bugs.launchpad.net/kicad/+bug/1831510
2019-08-20 19:14:05 +01:00
Seth Hillbrand
3135b63976
Eeschema: Update pins on paste
...
We use the pin cache to mark the pin locations for future operations.
This needs to be updated after paste.
Fixes: lp:1840286
* https://bugs.launchpad.net/kicad/+bug/1840286
2019-08-16 09:32:35 -07:00
Ian McInerney
49dd5d838c
libedit: Fix inverted Y axis on move command
...
Also clean up some code formatting issues
2019-08-15 20:13:18 +01:00
Jeff Young
29af26565d
Fix re-entrancy issue in LibEdit move tool.
2019-08-15 15:51:27 +01:00
Jeff Young
8ba7d4570c
Move warp-mouse-on-move setting from Eeschema settings to common settings.
...
It's also used by the Symbol Editor, and will likely be used by
Pcbnew and friends in the future.
2019-08-15 12:53:04 +01:00
Jeff Young
206b40621e
Fix bugs in Eeschema paste.
...
1) don't ASSERT; use exceptions (which can be caught) instead.
2) clean up LIB_LOGGER so it's only used during sync
3) fix typos in wxLogMessage() calls so they produce output.
4) throw on unrecognized token in loadContent().
5) if clipboard can't be pasted as content then paste as text.
Fixes: lp:1840172
* https://bugs.launchpad.net/kicad/+bug/1840172
2019-08-15 10:00:23 +01:00
Jeff Young
b4c8657904
Fix non-visible-part or conversion items from getting selected.
...
Also renames lib_draw_item to lib_item to match the class.
Fixes: lp:1840170
* https://bugs.launchpad.net/kicad/+bug/1840170
2019-08-15 10:00:23 +01:00
Jeff Young
3cdf88f2c6
CERN copyrights for work packages.
2019-08-14 09:35:15 +01:00
Jeff Young
e855b244ae
Highlight whole net for simulation voltage probe.
2019-08-12 22:21:09 +01:00
Michael Kavanagh
b414cbfada
Cleanup doDelete ACTIONs
2019-08-12 13:49:55 -04:00
Michael Kavanagh
79b2ff7551
Refactor deleteTool ACTION removing duplicates
2019-08-12 13:49:55 -04:00
Jeff Young
039bd92ea5
Make LibEdit respect the Move-warps-cursor setting.
2019-08-10 11:58:05 +01:00
Jeff Young
c5fb8518d2
Redraw pins when placing when they are modified.
...
Fixes: lp:1839363
* https://bugs.launchpad.net/kicad/+bug/1839363
2019-08-08 14:09:42 +01:00
Jeff Young
9fe7bfb596
Check for focus loss from dialog before doing cut/copy/paste in edit frame.
...
Fixes: lp:1838708
* https://bugs.launchpad.net/kicad/+bug/1838708
2019-08-08 13:51:23 +01:00
Jeff Young
a96158e26b
Add current probe to SPICE simulation.
...
Fixes: lp:1740321
* https://bugs.launchpad.net/kicad/+bug/1740321
2019-08-05 16:48:18 -06:00
Jeff Young
23d824de66
Simulator improvements.
...
1) Add highlighting to simProbe and simTune tools.
2) Probe tool should accept wires and pins, not wires and components.
3) Give simulator window a flat look to match rest of Kicad.
4) Collapse whitespace out of simulator window.
5) Add some error messages.
6) Add some whitespace to simulation setting dialog.
2019-08-05 16:48:18 -06:00
Ian McInerney
ce7833b982
Warp display when selecting schematic items
...
When selecting items where the reference point is off-screen, GTK
would default the cursor to jump to the bottom of the screen.
Fixes: lp:1838843
* https://bugs.launchpad.net/kicad/+bug/1838843
2019-08-03 19:17:53 -06:00
Jeff Young
c624ee9cff
Re-parent new objects on duplicate.
...
Fixes: lp:1838269
* https://bugs.launchpad.net/kicad/+bug/1838269
2019-08-01 21:40:18 -06:00
Jeff Young
03a33b6b56
Selection fixes for multi-part lib items.
...
1) Don't select pins from other units/conversions
2) Don't delete pins from other units/conversions
Fixes: lp:1838511
* https://bugs.launchpad.net/kicad/+bug/1838511
2019-07-31 22:34:24 -06:00
Jeff Young
c03535343c
Don't apply GTK fix to OSX: it produces somewhat random crashes.
...
Fixes: lp:1837225
* https://bugs.launchpad.net/kicad/+bug/1837225
2019-07-28 11:28:42 -06:00
Jeff Young
70270f5bd1
Fix accidental commit of debugging change.
2019-07-27 23:33:34 -06:00
Jeff Young
0a0eb35ee8
Update comments with latest test results.
2019-07-27 23:27:21 -06:00
Jeff Young
2af41e87f9
Don't add first found object to selection until Find (or return) is hit.
...
Fixes: lp:1838021
* https://bugs.launchpad.net/kicad/+bug/1838021
2019-07-27 00:20:52 -06:00
Jeff Young
21b90de829
Another attempt to work around Apple's [NSAlert runModal] bug.
...
Fixes: lp:1837225
* https://bugs.launchpad.net/kicad/+bug/1837225
2019-07-26 16:47:17 -06:00
Jeff Young
77334628c4
Change default tool behaviour to skip unhandled events.
...
The problem is that wxEVT_CHAR_HOOK doesn’t do the key translation
properly. wxEVT_CHAR does, but we only get to that if we skip the
event at the end of the tool’s event processing loop, which most tools
don’t do. (Selection tools, point editors, pickers, and a couple of
others do skip, which is probably why this didn’t get reported earlier.)
I played around with a couple of ways to fix wxEVT_CHAR_HOOK. Most of
them don’t work, and the few egregious hacks I tried weren't cross-
platform.
So I’m changing it so that most tools now skip at the end of their
event loops. I left out a couple that I felt were high risk (length
tuning, for instance). But there’s still enough risk that I’m 100%
sure it will break something, I just haven’t a clue what.
Fixes: lp:1836903
* https://bugs.launchpad.net/kicad/+bug/1836903
2019-07-26 12:21:24 -06:00
Jeff Young
815602d1af
Fix missing AF_ACTIVATE flags on some tools.
...
Fixes: lp:1813659
* https://bugs.launchpad.net/kicad/+bug/1813659
2019-07-26 12:21:24 -06:00
jean-pierre charras
6b031d9b9e
Symbol editor: fix an issue when editing LIB_RECTANGLE graphic items.
...
The point editor expects rectangles with a height and width > 0.
Previously, this constraint did not exist,
so some LIB_RECTANGLE graphic items can create issues when trying to move a corner.
Now, the LIB_RECTANGLE graphic item is normalized before trying to move a corner.
2019-07-26 10:40:40 +02:00
Jeff Young
b858fa38c4
Fix crash bugs in picker tools.
2019-07-21 19:06:06 -06:00
jean-pierre charras
de4854d112
Eeschema - restrict buses and wires to H and V orientation was taken in account only when activating the Create Bus or Wire tool.
...
Now taken in account during creation.
Fixes: lp:1837308
https://bugs.launchpad.net/kicad/+bug/1837308
2019-07-21 10:02:43 +02:00
Jeff Young
4d4adf0753
A possible hack to work around the apple runModal bug.
...
Fixes: lp:1837225
* https://bugs.launchpad.net/kicad/+bug/1837225
2019-07-20 17:31:56 -06:00
Jeff Young
0821f1ac11
Move crosshairs to found item; remove find highlighting when find dialog closed.
...
Fixes: lp:1837069
* https://bugs.launchpad.net/kicad/+bug/1837069
2019-07-19 18:41:11 -06:00
Jeff Young
0b08e4dcd2
Deactivate other tools when running one based on a PICKER.
...
In particular, if the last one was a PICKER tool, then we're going
to assert on "click-handler-already-set".
Fixes: lp:1836673
* https://bugs.launchpad.net/kicad/+bug/1836673
2019-07-19 15:29:10 -06:00
jean-pierre charras
e32a50b34d
Simulator: fix a crash when using the "Probe" or "Tune" tool, when clicking on an item is schematic editor.
2019-07-19 10:12:54 +02:00
Seth Hillbrand
5324b65fb0
eeschema: Don't trust the pointer
...
We are not guaranteed a selection. Keep pointers to the front items
guarded. This can happen after repeating a new item, e.g.
2019-07-17 18:21:36 -07:00
Jeff Young
3de00eef5f
Cleanup.
2019-07-17 21:45:43 +01:00
Jeff Young
d67c2d13c7
Fix re-entrancy problem in cross-probing.
...
Fixes: lp:1836940
* https://bugs.launchpad.net/kicad/+bug/1836940
Fixes: lp:1836937
* https://bugs.launchpad.net/kicad/+bug/1836937
2019-07-17 21:35:28 +01:00
Jeff Young
a61673a144
Fix compile error for those who have to use the somewhat feeble gcc.
2019-07-16 15:11:50 +01:00
Jeff Young
7d10b29592
Cleanup unused includes.
2019-07-16 01:15:33 +01:00
Jeff Young
3069fd5974
Exit point editor after an <esc> while dragging.
...
Fixes: lp:1836652
* https://bugs.launchpad.net/kicad/+bug/1836652
2019-07-16 01:09:49 +01: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
58ca5b71a9
A more robust fix for 36f1d023f0
.
...
This one also handles when the events get out-of-order due to them
starting out in the Simulation window and not getting dispatched until
the mouse goes over the Schematic window.
Fixes: lp:1835907
* https://bugs.launchpad.net/kicad/+bug/1835907
Fixes: lp:1836544
* https://bugs.launchpad.net/kicad/+bug/1836544
2019-07-15 14:15:24 +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
029b624e96
When adding new wires due to directly-connected items, don't try and de-select them after an undo. The won't be around anymore.
...
Fixes: lp:1836218
* https://bugs.launchpad.net/kicad/+bug/1836218
2019-07-11 17:36:32 +01:00
Jeff Young
cd1a1a67fb
Add seleciton/brightening/highlighting to images.
2019-07-10 01:14:28 +01:00
Jeff Young
30ec895c96
Cleanup event processing stuff to keep better track of "handled".
...
See: https://lists.launchpad.net/kicad-developers/msg41471.html .
2019-07-09 21:59:46 +01:00
Jeff Young
483dc24e87
Homogenize selection tools around our HIG.
...
In particular make addative and exclusive-or selections work the
same way.
Also give Highlight Net a hotkey now that it can't use ctrl-click
anymore.
2019-07-09 21:59:46 +01:00
Jeff Young
36f1d023f0
Make sure Push/PopTool() go in the right order.
...
Because the pickers are called with an Activate()/Wait() pair, any
usurping tool gets in between the picker handling the cancel (due
to activation) and the picker client doing a PopTool(). The new
tool is therefore pushed before the old tool is popped.
Fixes: lp:1835907
* https://bugs.launchpad.net/kicad/+bug/1835907
2019-07-09 15:03:23 +01:00
Jeff Young
46f47adebe
Update symbols after assigning different LIB_IDs.
...
Fixes: lp:1835612
* https://bugs.launchpad.net/kicad/+bug/1835612
2019-07-09 12:38:41 +01:00
Jeff Young
3a8f32c380
Convert ShowEEschema to an ACTION so it can get a hotkey assignment.
...
Fixes: lp:1686010
* https://bugs.launchpad.net/kicad/+bug/1686010
2019-07-09 00:43:41 +01:00
Jeff Young
d3d0bdbe17
Go back to rotating selection around center.
...
Fixes: lp:https://bugs.launchpad.net/kicad/+bug/1833371
* https://bugs.launchpad.net/kicad/+bug/https://bugs.launchpad.net/kicad/+bug/1833371
2019-07-09 00:14:32 +01:00
Jeff Young
772dff7a01
Removed post-page-settings ZoomFitToScreen() calls.
...
Fixes: lp:1834608
* https://bugs.launchpad.net/kicad/+bug/1834608
2019-07-08 00:06:28 +01:00
Jeff Young
a9c66e15ea
Common-ize EE_ACTIONS::refreshPreview and use it after cursor actions.
...
Fixes: lp:1818667
* https://bugs.launchpad.net/kicad/+bug/1818667
2019-07-05 14:45:15 +01:00
jean-pierre charras
fffb0d340f
Eeschema: fix not deletable bitmap issue (missing SCH_BITMAP in deletable list).
...
Also display bitmap info in message panel.
Fixes: lp:1835125
https://bugs.launchpad.net/kicad/+bug/1835125
2019-07-05 10:25:23 +02:00
Maciej Suminski
c715a22e1c
Symbol Editor: clear IS_NEW flag after placing a pin
...
IS_NEW flag needs to be cleared after a pin is placed, otherwise further
move operations will keep adding the pin to the edited symbol.
2019-07-03 13:32:47 +02:00
Jeff Young
d03041b565
Cleanup.
2019-07-02 21:36:42 +01:00
Jeff Young
9effd24f3a
Allow move tool to run on top of other tools.
...
Fixes: lp:1784480
* https://bugs.launchpad.net/kicad/+bug/1784480
2019-07-01 22:15:25 +01:00
Jeff Young
ad26ece8d4
Add Global Edit Text and Graphics Properties to Eeschema.
...
Fixes: lp:1801150
* https://bugs.launchpad.net/kicad/+bug/1801150
2019-07-01 22:15:25 +01:00
jean-pierre charras
5ed8ba5bf3
Libedit: fix a bug in edit graphic item properties:
...
When changing the common to units and/or common to convert options, the item properties were not updated.
2019-07-01 12:36:46 +02:00
Jeff Young
d88bddad7e
Respect m_DrawSpecificUnit and m_DrawSpecificConvert when pasting.
...
Fixes: lp:1834719
* https://bugs.launchpad.net/kicad/+bug/1834719
2019-06-29 22:20:40 +01:00
Jeff Young
09b07cd387
Minor adjustments to arc editing algorithms.
...
1) Don't snap center since it will be re-computed (most likely
off-grid) anyway.
2) Don't flip shape during initial drawing.
2019-06-29 20:03:08 +01:00
Jeff Young
232e21cb37
Restore selection properly after an undo.
2019-06-29 20:03:08 +01:00
Jeff Young
a498d7e9c5
Try out a new arc-editing paradigm for LibEdit.
...
This is based on the notion that in Kicad the start and end-points
are far more important (as they usually connect to other segments)
than the center is.
2019-06-29 16:10:58 +01:00
Jeff Young
2ed3bf47bb
Improve hittesting for Eeschema and LibEdit delete tools.
2019-06-28 22:18:30 +01:00
Jeff Young
a72b5416c3
Show preview object for Eeschema junction, noconnect and bus entry tools.
2019-06-28 22:18:30 +01:00
Jeff Young
981072598b
Overhaul cursor code for new tool/action framework.
...
Includes the addition of an onSetCursor() handler which must be called
from both the GAL canvas AND the GAL backend (at least on OSX) to prevent
cursor flickering between (for instance) pencil and arrow.
Also includes new architecture for point editors which allows them to
coordiate cursors with the editing tools (so we can switch to an arrow
when over a point).
2019-06-27 22:37:11 +01:00
Jeff Young
2f23aa9556
Implement a more robust tool stacking architecture.
...
We were running into various corner conditions where a tool's event
loop would exit while the tool was still active, or the tool would
get popped while we were still in the event loop. (A lot of these
had to do with the POINT_EDITOR's, but not all of them.)
The new architecture:
1) tools always do a Push()/Pop()
2) everyone is responsible for their own pops; no more stack-clearing
on a cancel
3) CancelInteractive events go to all tools to facilitate (2)
2019-06-27 17:01:31 +01:00
Jeff Young
7208ef481f
Don't confuse a pasted pin with being synchronized.
...
It's only at the same location because it was copied from there.
Fixes: lp:1834377
* https://bugs.launchpad.net/kicad/+bug/1834377
2019-06-27 00:24:42 +01:00
Jeff Young
5e40de9357
Clear IS_NEW flag after placing pin so the tool knows we're no longer drawing.
...
Fixes: lp:1834376
* https://bugs.launchpad.net/kicad/+bug/1834376
2019-06-27 00:02:13 +01:00
Jeff Young
7292ce6a8b
Improve eeschema selection disambiguation logic.
2019-06-26 21:54:03 +01:00
Jeff Young
c77d214c5f
Clear annotation of pasted sheets only when they already exist in the current hierarchy.
...
Fixes: lp:1833205
* https://bugs.launchpad.net/kicad/+bug/1833205
2019-06-26 21:54:03 +01:00
Jeff Young
89d1d3d299
Real-time highlighting for PlEditor delete tool.
2019-06-25 21:10:21 +01:00
Jeff Young
4eaba20cd3
Real-time highlighting for Pcbnew and ModEdit delete tools.
2019-06-25 21:10:21 +01:00
Jeff Young
f9702aab87
Immediate actions for PlEditor, PcbNew, etc.
2019-06-25 11:34:28 +01:00
jean-pierre charras
70ff2e14a5
Eeschema: avoid crashes when the tool highlight or delete is activated and clicking in a empty schematic.
...
Was a nullptr not tested.
2019-06-25 08:31:22 +02:00
Seth Hillbrand
39c2745f55
eeschema: Allow spaces in label names for multilabeling
...
This adds the functionality to add multiple labels to your schematic at
once by using spaces in the original label name.
Fixes: lp:1095113
* https://bugs.launchpad.net/kicad/+bug/1095113
2019-06-20 16:21:49 -07:00
Jeff Young
485d436860
Clear ctx-menu before rebuilding; don't veto ctx-menu mousewarp for non-ctx-menu dialog.
...
Fixes: lp:1833312
* https://bugs.launchpad.net/kicad/+bug/1833312
2019-06-19 21:17:56 +01:00
Jeff Young
4054d7ddf7
Don't try an intertwine deletion and junction fixup.
...
Fixes: lp:1833224
* https://bugs.launchpad.net/kicad/+bug/1833224
2019-06-19 19:30:38 +01:00
Jeff Young
730b89af6d
Another round of changes for immediate actions.
2019-06-19 18:35:17 +01:00
Jeff Young
3a0256aade
Add handle-based editing for eeschema bitmaps.
...
Also cleans out a bunch of duplicated functionality from the image
editor dialog.
Fixes: lp:1828722
* https://bugs.launchpad.net/kicad/+bug/1828722
2019-06-19 18:35:17 +01:00
Seth Hillbrand
e16bf40e60
eeschema: Insert junctions when repeating
...
This is the v6 analog to 697234dd5
Fixes: lp:1832253
* https://bugs.launchpad.net/kicad/+bug/1832253
2019-06-18 20:12:08 -07:00
Jeff Young
b8dfc1f26a
Fix import sheet pin.
...
Fixes: lp:1829314
* https://bugs.launchpad.net/kicad/+bug/1829314
2019-06-18 22:44:22 +01:00
Jeff Young
581b5257e1
One more try getting <ESC>/PopTool behaviour right.
2019-06-18 22:34:31 +01:00
Jeff Young
b0c1c1ad2b
Select both ends of wires in block select.
...
Fixes: lp:1830717
* https://bugs.launchpad.net/kicad/+bug/1830717
2019-06-18 20:24:15 +01:00
Jeff Young
dcbd897a95
Push/pop tools even when selected from the toolbar.
2019-06-18 20:24:15 +01:00
Jeff Young
7dd247f1dc
Make better use of TOOL_EVENT parameters.
2019-06-18 20:24:15 +01:00
Jeff Young
9e464f9f5b
Implement rollover highlighting for Eeschema delete tool.
2019-06-17 22:15:20 +01:00
Jeff Young
7cfe19d9fd
Cleanup.
2019-06-17 22:15:20 +01:00
Jeff Young
1f35ec5521
Beware of copying events and losing the m_passEvent flag.
...
Fixes: lp:1833031
* https://bugs.launchpad.net/kicad/+bug/1833031
2019-06-17 14:44:39 +01:00
Jeff Young
5d7739a662
Handle '&'s in menu labels.
...
Fixes: lp:1832904
* https://bugs.launchpad.net/kicad/+bug/1832904
2019-06-17 10:45:23 +01:00
Jeff Young
e6d5110ccf
Implement I18N for ACTIONs.
...
It's a bit of a hack because they're statically initialized and
so we can't make use of the _() macro. We do still want it in the
code, however, because the string harvesting is based off of it.
Fixes: lp:1833000
* https://bugs.launchpad.net/kicad/+bug/1833000
2019-06-17 10:45:23 +01:00
Wayne Stambaugh
418bd28347
Fix build error.
2019-06-16 18:31:10 -04:00
Jeff Young
dd3617cfda
Fix compile issue.
2019-06-16 22:46:35 +01:00
Jeff Young
de67f3f1e9
Move a few more things to ACTIONs.
2019-06-16 19:53:30 +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
e4fbd003e0
Make m_passEvent event-specific rather than global.
...
If a tool called something like clearSelection while processing a
MOUSE_CLICK, the SELECTION_TOOL will pass the clearSelection
COMMAND_EVENT because it handles it as a transition, not as an
event. Because m_passEvent is effectively global, the tool manager
would then interpret that as passing the MOUSE_CLICK and we'd end
up processing the click by multiple tools.
2019-06-16 12:06:49 +01:00
jean-pierre charras
6a8e69f9c9
Fix a compil warning.
2019-06-16 09:12:32 +02:00
Jeff Young
0f4bdbd184
Tighten down the POINT_EDITORs a bit more.
2019-06-16 01:33:39 +01:00
Jeff Young
18ebced8f4
Code hygiene.
2019-06-15 20:43:52 +01:00
Jeff Young
19aba615c2
Remove selection condition from conditional menu separators.
...
We don't allow duplicate separators anyway so all they really do
is complicate the code.
2019-06-15 20:43:51 +01:00
Jeff Young
5610261dce
Immediate-action hotkeys (and context menu actions) for eeschema.
2019-06-15 20:43:51 +01:00
Jeff Young
83ee51370c
Cancel interactive editing when switching sheets.
...
Fixes: lp:1819278
* https://bugs.launchpad.net/kicad/+bug/1819278
2019-06-14 16:54:46 +01:00
Maciej Suminski
7d69a917b9
Fixed a crash in EE_SELECTION_TOOL::SelectPoint()
...
The for loop is continued after an item removal, so the removed item
is not accessed anymore.
2019-06-14 13:00:39 +02:00
Jeff Young
8cc1e2b5e7
Fix breakage in wire moving/dragging/etc.
...
Fixes: lp:1832750
* https://bugs.launchpad.net/kicad/+bug/1832750
2019-06-13 19:58:37 +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
Jeff Young
4043a15482
When pasting a sheet link to existing copy if it already appears in the hierarchy.
...
Fixes: lp:1830633
* https://bugs.launchpad.net/kicad/+bug/1830633
2019-06-13 15:51:32 +01:00
Jeff Young
c0e1f7a17a
Add dragging of wire ends, corners and junctions.
...
Fixes: lp:1830007
* https://bugs.launchpad.net/kicad/+bug/1830007
2019-06-11 21:20:19 +01:00
Jeff Young
b1b7408cf2
Accidentally checked in some debugging stuff.
2019-06-11 18:53:36 +01:00
Jeff Young
7726b039b2
Re-jigger standard submenus so they both link AND work.
2019-06-11 18:03:16 +01:00
Jeff Young
05652d4787
Rework the preparation for eeschema's move-tool.
...
There are a whole bunch of cases which all have to work:
regular move
move followed by drag
drag followed by move
move followed by duplicate
duplicate
paste
and all both with and without Warp Mouse on Move checked.
2019-06-11 18:03:16 +01:00
Jeff Young
e4d16abcbd
Fix overly-generic flag test when synchronizing pins.
...
Fixes: lp:1832170
* https://bugs.launchpad.net/kicad/+bug/1832170
2019-06-11 09:29:30 +01:00
Jeff Young
09a3c5b280
Update pasted items' parent pointers.
...
Fixes crashes when trying to manipulate the item after the paste,
and weird redraw behaviour with pins.
Fixes: lp:1832178
* https://bugs.launchpad.net/kicad/+bug/1832178
2019-06-11 09:22:56 +01:00
Jeff Young
6623ab91a8
Fix issue with picker tool activation.
2019-06-11 00:25:38 +01:00
Jeff Young
e9017ce0b1
Update status bar when selected items are modified.
...
Fixes: lp:1831801
* https://bugs.launchpad.net/kicad/+bug/1831801
2019-06-10 23:46:01 +01:00
Jeff Young
a568e70b99
Follow naming conventions.
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
765606012f
Convert separate-compilation of selection.cpp to polymorphism.
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
b9927a0655
Don't put standard menu items into symbol tree context menu.
2019-06-05 23:33:15 +01:00
Jeff Young
469fc3b572
Finish moving symbol editor tree context menu to ACTIONs.
2019-06-05 23:29:59 +01:00
Jeff Young
2d40425e4d
Move footprint & symbol tree context menus to tool infrastructure.
...
Fixes: lp:1831692
* https://bugs.launchpad.net/kicad/+bug/1831692
2019-06-05 20:16:48 +01:00
Jeff Young
1ea5b04e22
More ACTIONS work. Nearly done now.
2019-06-04 22:31:42 +01:00
Jon Evans
1721cc1700
Ensure pasted sheets get parents set properly for screen discovery
...
Fixes: lp:1831460
* https://bugs.launchpad.net/kicad/+bug/1831460
2019-06-03 20:30:35 -04: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
33773bad4d
Yet more command conversions to ACTIONs.
2019-06-02 21:10:56 +01:00
Jeff Young
dfc2fe3929
Don't try to post-process an empty clipboard paste.
...
Fixes: lp:1831364
* https://bugs.launchpad.net/kicad/+bug/1831364
2019-06-02 16:21:44 +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
f1076c0f48
Fix missing reference keeping history from getting saved.
...
Fixes: lp:1830185
* https://bugs.launchpad.net/kicad/+bug/1830185
2019-05-31 23:38:15 +01:00
Jeff Young
c7fa5c567f
Load sheet content after a paste.
...
Fixes: lp:1830633
* https://bugs.launchpad.net/kicad/+bug/1830633
2019-05-31 23:38:15 +01:00
Jeff Young
1dd1ddf83b
Try an "add wires" strategy instead of trying to figure out what to pick up and what to anchor.
...
Fixes: lp:1831199
* https://bugs.launchpad.net/kicad/+bug/1831199
2019-05-31 21:56:35 +01:00
Jeff Young
d7774b94fc
Fix regression with switching between drag and move operation.
2019-05-31 21:56:35 +01:00
Jeff Young
ead1914b1d
Don't autopan until mouse moves.
2019-05-31 21:55:30 +01:00
Jeff Young
d2daab808c
Remove some legacy cursor handling stuff.
2019-05-31 21:54:22 +01:00
jean-pierre charras
4842c73530
Fix minor compil warnings.
2019-05-31 21:38:30 +02:00
Jeff Young
0260b32125
Push resetLocalCoords down into COMMON_TOOLS.
...
Fixes: lp:1830693
* https://bugs.launchpad.net/kicad/+bug/1830693
2019-05-29 00:26:29 +01:00
Jeff Young
db90e97d0b
fixup! Implement undo for Page Settings in PlEditor, Eeschema and PCBNew.
2019-05-27 14:12:20 +01:00
Jeff Young
d24a2afaca
Fix duplicate to work like paste to keep pins from getting duplicated.
...
Also fixes the post-duplicate move to start at the cursor pos.
Also fixes the fact that duplicate wasn't getting its hotkey.
Fixes: lp:1830596
* https://bugs.launchpad.net/kicad/+bug/1830596
2019-05-27 11:58:56 +01:00
Jeff Young
800cc1a11c
Fix intial drag point for paste in LibEdit.
2019-05-27 11:58:56 +01:00
Jeff Young
e9e28b9aac
Retire legacy block architecture.
2019-05-27 11:58:56 +01:00
Jeff Young
927d2a645c
Move LibEdit Save operations to ACTIONS.
2019-05-27 11:58:55 +01:00
Jeff Young
6936effaa7
Implement undo for Page Settings in PlEditor, Eeschema and PCBNew.
...
Fixes: lp:1820059
* https://bugs.launchpad.net/kicad/+bug/1820059
2019-05-27 11:58:55 +01:00
jean-pierre charras
568d4e2b19
Avoid including id.h in a lot of files that do not use it.
2019-05-26 08:14:25 +02:00
jean-pierre charras
b8e2054b23
Activate context menu in LIB_VIEW_FRAME canvas.
2019-05-25 10:13:27 +02:00
Jeff Young
a3dfce5adb
Implement common file menu actions and move Eeschema over.
2019-05-25 01:14:21 +01:00
Jeff Young
85f984ccd9
Add point-editor activation for immediate-mode drawing.
2019-05-24 19:49:09 +01:00
Jeff Young
323bb0f8e1
Moving PageLayout editor to GAL canvas and modern toolset.
2019-05-24 19:49:09 +01:00
Michael Kavanagh
43a5bb72ca
Fix swapped mirror icons in eeschema context menu
...
Fixes: lp:1828631
* https://bugs.launchpad.net/kicad/+bug/1828631
2019-05-24 13:12:58 -04:00
Jon Evans
ab3ada5200
Clear moving flag for second-click-placed items
...
Fixes: lp:1830227
* https://bugs.launchpad.net/kicad/+bug/1830227
2019-05-23 21:51:14 -04:00
Jeff Young
ebd8c44eee
Don't confuse SCH_ITEMs and LIB_ITEMs.
...
Fixes: lp:1829826
* https://bugs.launchpad.net/kicad/+bug/1829826
2019-05-23 22:57:53 +01:00
jean-pierre charras
872c8ca37b
Remove a duplicate icon.
2019-05-23 16:21:06 +02:00
John Beard
e1f6230e8c
Do not statically construct wxTimer
...
If you construct wxTimer statically, it will be constructed
before WX init, which means you might get assertions about
missing m_impl's within the timer class.
The solution is to construct the wxTimer at run time. In this
case, static within the function will be constructed only after
the function is called (and actually the scope only needed to be
this function anyway).
2019-05-23 11:28:11 +01:00
Jeff Young
0047f88f82
Mark unfold bus menu as clean so it doesn't get generated a second time.
...
Fixes: lp:1829878
* https://bugs.launchpad.net/kicad/+bug/1829878
2019-05-23 00:27:53 +01:00
Jeff Young
1636405b66
Set a reference point for all selection sizes.
...
Fixes: lp:1829833
* https://bugs.launchpad.net/kicad/+bug/1829833
2019-05-23 00:27:53 +01:00
Tomasz Włostowski
ecb81426a4
eemodern: fixed use-after-free in SCH_DRAWING_TOOLS::DrawSheet().
2019-05-23 00:28:58 +02:00
Jeff Young
323ecada8d
Generate refresh preview events when objects are moving.
...
Fixes: lp:1829683
* https://bugs.launchpad.net/kicad/+bug/1829683
2019-05-22 21:48:04 +01:00
Jeff Young
fbffb9ae1e
Don't put KICAD_T arrays on stack and expect them to be there when you need them.
...
Fixes: lp:1829748
* https://bugs.launchpad.net/kicad/+bug/1829748
2019-05-22 21:48:04 +01:00
Jeff Young
67f7571f04
Don't call VIEW::Redraw() from within the tool.
...
Fixes: lp:1828824
* https://bugs.launchpad.net/kicad/+bug/1828824
2019-05-22 21:48:04 +01:00
Jeff Young
67cc2aac2e
Rework Eeschema find/replace for modern toolset.
...
Fixes: lp:1827274
* https://bugs.launchpad.net/kicad/+bug/1827274
Fixes: lp:1827240
* https://bugs.launchpad.net/kicad/+bug/1827240
2019-05-22 21:48:04 +01:00
Tomasz Włostowski
2b38b23a5e
eemodern: fixed use-after-free crash in LIB_EDIT_TOOL::DoDelete()
2019-05-22 21:35:03 +02:00
jean-pierre charras
f18807ea0f
Eeschema: Ensure axis are always drawn in libedit and viewlib
...
Fixes: lp:1822408
https://bugs.launchpad.net/kicad/+bug/1822408
2019-05-22 10:04:34 +02:00
Seth Hillbrand
e1373d70ae
libedit: Ensure proper dereference in shared tools
...
Fixes: lp:1829826
* https://bugs.launchpad.net/kicad/+bug/1829826
2019-05-21 19:43:15 -07:00
Tomasz Włostowski
bc52f0a03b
eemodern: clean printf debug gibberish, implement inline drag, move & cursor warp/reference point options
2019-05-20 21:04:46 +02:00
Tomasz Włostowski
af30eca3cb
eemodern: hover selection should autoclear after invoking properties dialog
2019-05-20 21:04:46 +02:00
Tomasz Włostowski
aff3243f3b
eeschema: fix use-after-free crash in GetScreen()/GetCurrentSheet()
2019-05-20 21:04:46 +02:00
Tomasz Włostowski
034669bf30
eemodern: implement drag-related settings in the Preferences window
2019-05-20 21:04:46 +02:00
Tomasz Włostowski
5ea46e8b78
eemodern: initial attempt at inline drag/move actions
2019-05-20 21:04:46 +02:00
Jeff Young
813de6a1f3
Implement brightening for Eeschema Find/Replace.
2019-05-18 14:28:22 +01:00
Jeff Young
21a7621ddb
Fix issues with multiple M or G commands in a row.
2019-05-18 14:11:19 +01:00
Jeff Young
952108dd43
Implement SCH_SHEET_PIN selection, rotation and mirroring.
...
Fixes: lp:1829521
* https://bugs.launchpad.net/kicad/+bug/1829521
2019-05-18 00:23:12 +01:00
Jeff Young
5f851a4bad
Add AutoplaceFields to symbol tool context menu.
2019-05-18 00:21:49 +01:00
Jeff Young
7c25001622
Implement immediate actions for adding and importing sheet pins.
...
Fixes: lp:1829314
* https://bugs.launchpad.net/kicad/+bug/1829314
2019-05-18 00:21:49 +01:00
Jeff Young
6b3fe33d6f
Improve selection logic for sloppy selections.
2019-05-17 00:48:39 +01:00
Jeff Young
5dd71b5563
Disable pin table and part properties when there's no part.
...
Fixes: lp:1828962
* https://bugs.launchpad.net/kicad/+bug/1828962
2019-05-16 23:53:33 +01:00
Jeff Young
68224e0fcd
Don't double-add pins to parent part when pasting.
...
Also adds undo to paste operations in LibEdit.
Fixes: lp:1829355
* https://bugs.launchpad.net/kicad/+bug/1829355
2019-05-16 23:53:11 +01:00
Jeff Young
0dd1584394
Add import-sheet-pin error message and move messages to status popups.
...
Fixes: lp:1829314
* https://bugs.launchpad.net/kicad/+bug/1829314
2019-05-16 23:11:22 +01:00
Jeff Young
6630a7227d
Constrain SHEET_PIN movement, and keep them attached when resizing SHEET.
...
Fixes: lp:1829314
* https://bugs.launchpad.net/kicad/+bug/1829314
2019-05-16 22:36:19 +01:00
Jeff Young
fbb807f3bb
Move some more menu & toolbar items to modern toolset.
2019-05-16 19:57:06 +01:00
Jeff Young
eba892009d
Improve hit-test logic by gradually increasing threshold.
...
Fixes: lp:1828222
* https://bugs.launchpad.net/kicad/+bug/1828222
2019-05-16 19:57:05 +01:00
Jeff Young
69afa27a5f
Implement ACTION_TOOLBAR and update some of the menus to ACTION_MENU.
...
This gives us better separation of MVC in line with the design of
the modern toolset. It also reduces a whole bunch of duplicated
data.
2019-05-15 17:50:52 +01:00
Jeff Young
f9e4ee1fc9
CONTEXT_MENU -> ACTION_MENU. (Now used for menu-bar menus too.)
2019-05-15 17:50:52 +01:00
Jeff Young
e850592587
Cleanup.
2019-05-15 17:50:52 +01:00
Jeff Young
ef5c69167a
Start moving some LibEdit and SchEdit menubar menus to actions.
...
Also includes a bunch of bug fixes that got intermingled.
Fixes: lp:1828826
* https://bugs.launchpad.net/kicad/+bug/1828826
Fixes: lp:1828826
* https://bugs.launchpad.net/kicad/+bug/1828826
Fixes: lp:1828793
* https://bugs.launchpad.net/kicad/+bug/1828793
2019-05-13 21:44:29 +01:00
Jeff Young
d290154dd3
Fix rectangle resizing in LibEdit.
...
Fixes: lp:1828791
* https://bugs.launchpad.net/kicad/+bug/1828791
2019-05-13 21:44:29 +01:00
Jeff Young
924a5e68f0
Fix missing superclass call.
2019-05-12 18:20:41 +01:00
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
f602ccd814
Insert EE_TOOL_BASE under SchEdit and LibEdit tools, and fix errant rename scope which clobbered PCBNew's PICKER_TOOL.
2019-05-12 13:47:08 +01:00
Jeff Young
5c39521149
Move Symbol Properties and Pin Table to actions.
...
Fixes: lp:1804273
* https://bugs.launchpad.net/kicad/+bug/1804273
2019-05-11 15:38:49 +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
76a915d472
Fix highlighting when initiated via ctrl-click.
...
Fixes: lp:1796755
* https://bugs.launchpad.net/kicad/+bug/1796755
2019-05-11 15:38:49 +01:00
jean-pierre charras
0a308c4584
Fix minor compil warnings
2019-05-11 11:12:39 +02:00
Jeff Young
792c4328aa
Cleanup.
2019-05-10 21:40:08 +01:00
Jeff Young
a9f663d5ef
Soften hit-testing in SchEdit and LibEdit a bit.
...
Old threshold was 0; new is 5 pixels.
2019-05-10 20:46:28 +01:00
Jeff Young
0c2ba94b16
More sharing between SchEdit and LibEdit.
2019-05-10 20:22:26 +01:00
Jeff Young
86d1592777
Fix bug with re-enting selection main loop.
2019-05-10 19:56:20 +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
7da2631b27
Check item before concluding that ConvertText has run.
...
Otherwise we set item from nullptr back to the selection, and then
we think we're dragging again which causes all kinds of grief.
Fixes: lp:1828067
* https://bugs.launchpad.net/kicad/+bug/1828067
2019-05-10 16:11:57 +01:00
Jeff Young
f6e07f575a
Rename for clarity.
...
SetOffset() didn't set anything; it performed an action.
Move() suggests a delta, when it in fact does a SetPosition().
2019-05-10 16:11:57 +01:00
Jeff Young
ea0941cab3
Implement modern tools for LibEdit.
2019-05-10 16:11:57 +01:00
Jeff Young
40f41133b3
Move Circle, Arc, Rectangle and PolyLine tools to modern toolset.
2019-05-10 16:11:57 +01:00
Seth Hillbrand
589a37bfe8
eeschema: Don't segfault on empty drawlist
2019-05-09 15:11:36 -07:00
Seth Hillbrand
0e5f5d37d1
eeschema: Fix sign error in comparison
2019-05-09 14:10:53 -07:00
Seth Hillbrand
2f782ac7a4
eeschema: Prevent double-commit on duplicate/copy
...
When activating the move from a drag extension, we need to add
additional components to the commit. This breaks for duplicate/copy
when we have already added the correct components
2019-05-09 13:46:35 -07:00
jean-pierre charras
c716d66e53
Fix typo
2019-05-08 14:28:31 +02:00
Jeff Young
a40367ce17
Add a wire between direct-connect items when only is being dragged.
...
Fixes: lp:1798968
* https://bugs.launchpad.net/kicad/+bug/1798968
2019-05-07 20:39:46 +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
cf046e0548
Anchor a selected wire at the edge of a drag which is connected to a non-drag item.
...
Fixes: lp:1827846
* https://bugs.launchpad.net/kicad/+bug/1827846
2019-05-07 12:04:19 +01:00
Jeff Young
f40408187e
A couple of temp hacks for LibEdit <esc> processing while in transition.
...
Fixes: lp:1828004
* https://bugs.launchpad.net/kicad/+bug/1828004
2019-05-07 12:04:19 +01:00
Jeff Young
2097411550
Refresh RequestSelection selection if all items were filtered out.
...
If you have, for instance a pin selected and do a cmd-E we'll filter
out the pin and then do nothing. We should instead treat it as a
hover selection if everything got filtered.
2019-05-07 12:04:19 +01:00
Jeff Young
f1a38a6d41
Respond to <esc> from selection tool.
...
Fixes: lp:1827917
* https://bugs.launchpad.net/kicad/+bug/1827917
2019-05-06 21:56:19 +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
e5151ed639
Use parent's transform when moving SCH_FIELDs.
...
Fixes: lp:1827873
* https://bugs.launchpad.net/kicad/+bug/1827873
2019-05-06 21:41:44 +01:00
Jeff Young
a76bcc204f
Use parent's transform when moving SCH_FIELDs.
...
Fixes: lp:1827873
* https://bugs.launchpad.net/kicad/+bug/1827873
2019-05-06 16:59:23 +01:00
Jeff Young
b97d65e791
Fix crash bug when deleting sheet pin and disappearing bug when moving them.
...
Fixes: lp:1827890
* https://bugs.launchpad.net/kicad/+bug/1827890
2019-05-06 16:31:02 +01:00
Jeff Young
d12eee9c98
Process new sheets after drawing.
2019-05-06 15:31:23 +01:00
Jeff Young
207900e4f9
Move libedit message panel updating to the Inspection Tool.
2019-05-06 15:31:23 +01:00
Jeff Young
a12d769074
Code clarification and commenting.
...
Also renames toolbar files to reduce confusion with the modern toolset
tool files.
2019-05-06 15:31:23 +01:00
Jeff Young
f87d371b8b
Move to shared COLLECTORS for sch and lib.
2019-05-06 15:31:23 +01:00
Jeff Young
49231ac08f
Fix missing event processing for Leave Sheet button in toolbar.
2019-05-06 03:30:51 +01:00
Jeff Young
b7e67073ef
Fix bugs in bus unfold logic.
...
The worst of which left you in the bus unfold popup menu event loop
if you cancelled the menu by clicking outside it.
2019-05-05 19:48:11 +01:00
Jeff Young
0b2e1d00ea
Don't allow motion between two clicks of a dblclick to spoil forceHV.
2019-05-05 18:38:49 +01:00
Jeff Young
d881f4b21f
When unfolding a bus from the selection tool, stay in that tool.
2019-05-05 18:36:18 +01:00
Jeff Young
c4fac81dbb
Transition from bus to wire tool when unfolding bus.
2019-05-05 17:14:30 +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
fd546da640
Homogenize hit testing and selection return types.
...
Prep work for sharing SCH_SELECTION_TOOL with LibEdit.
2019-05-05 17:14:30 +01:00
Jeff Young
2d28ab7dd2
More cleanup.
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
dd9c426922
Cleanup a TODO.
2019-05-05 17:14:30 +01:00
Jeff Young
b5fd7b9842
Move Leave Sheet to the top of the context menu.
2019-05-05 17:14:30 +01:00
Jeff Young
7e3ad4585a
Fix issues with dragging, moving and rotating wires.
2019-05-05 17:14:30 +01:00
Jeff Young
2edb09e583
Double click action should enter sheet.
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
a825cdfa5a
Fix new image drawing issue.
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
2774af928a
Remove extra Show Datasheet menu item.
2019-05-05 17:14:30 +01:00
Jeff Young
20b63174dc
Support wire & bus drawing from selection tool.
2019-05-05 17:14:30 +01:00
Jeff Young
f95f202f81
Restore Jon's change which I accidentally nuked.
2019-05-05 17:14:30 +01:00
Jeff Young
4ca0f4da10
Fixes to the context menu logic around wire/bus drawing.
2019-05-05 17:14:30 +01:00
Jeff Young
7273748c57
Context menu cleanup for eeschema modern toolset.
2019-05-05 17:14:30 +01:00
Jeff Young
90a663facd
Implement sheet cleanup in modern toolset.
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
29f1787af2
Logic improvements and fixes for wire segment selection states.
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
0ea156042b
Fix over-zealous wire-grabbing for drag.
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
58ba573038
Handle cascading selections in placement.
...
See https://forum.kicad.info/t/call-for-testers-eemodern/16663/32
2019-05-05 17:14:29 +01:00
Jeff Young
e9dd8542d1
Allow user to change from move to drag and vice versa.
...
Also fixes bugs when doing a duplicate in the middle of a move.
2019-05-05 17:14:29 +01:00
Jeff Young
0af7c87277
Add resize sheet to context menus. Fix bugs in it.
...
Also assign a bunch of icons that were missing.
2019-05-05 17:14:29 +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
588d13a912
Fix gcc issue with temp variable and move some collection specs.
...
Having the collection specs localized with their code improves
encapsulation.
(Thanks to crasic for the original patch.)
2019-05-05 17:14:29 +01:00
Jeff Young
35e8a340ca
Add enter/leave sheet to modern toolset.
2019-05-05 17:14:29 +01:00
Jeff Young
423d430b58
Replace deleteNode and deleteConnection with selectNode and selectConnection.
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
f81007f74b
Some clean-up and moving message panel update to selection event.
2019-05-05 17:12:59 +01:00
Jeff Young
2244dcd567
Move show datasheet to SCH_INSPECTOR_TOOL and add show marker info.
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
ddbd92c274
Add some more context menu stuff to eeschema modern toolset.
2019-05-05 17:12:59 +01:00
Jeff Young
f2474d074b
Clean out stuff that's already been moved.
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
9e2bbcb8b6
Clean up delete and fix bug with juctions getting double-deleted.
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
eacc3e67a5
Implement repeatDrawItem in modern toolkit and fix bugs.
...
Fixes moving of SCH_FIELDS.
Fixes undo operations around SCH_FIELDS and SCH_PINS.
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
a80f7432b7
Update dangling ends when dragging block.
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
e0ada1379f
Allow clearing PcbNew highlight through cross-probing
...
Fixes: lp:1821486
* https://bugs.launchpad.net/kicad/+bug/1821486
2019-05-04 16:18:51 -04:00
Jon Evans
cbc8faf49b
Restore start segment behavior to unfold bus action
...
This must have gotten lost in the move
Fixes: lp:1826682
* https://bugs.launchpad.net/kicad/+bug/1826682
2019-05-01 21:03:30 -04: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
3aaba79b87
Fix crash when unfolding bus.
...
Thanks to Julien Faucher for the investigation into the problem.
2019-04-28 18:41:17 +01:00
Jeff Young
f9dd1324da
Cleanup problems with fighting event loops.
2019-04-25 22:58:58 +01:00
Jeff Young
8049c07a34
Add filtering to RequestSelection().
2019-04-25 22:58:58 +01:00
Jeff Young
e476cfcec5
Move SPICE tools to modern framework.
2019-04-25 22:58:58 +01:00
Jeff Young
5e556f0c6a
Fix segfault when finishing a wire at a connection point.
2019-04-24 14:43:10 +01:00
Jeff Young
e046e8f593
Fix crash when <esc>ing from Hierarchical Sheet drawing tool.
2019-04-24 13:43:46 +01:00
Jeff Young
d281f051ed
Move eeschema delete tool to modern toolset.
2019-04-23 14:19:55 +01:00
Jeff Young
a967adbf26
Don't toggle selection twice when trying to select.
...
Also fixes issues with trying to use a CONTEXT_MENU as a wxMenu.
2019-04-23 14:19:55 +01:00
Jeff Young
b6674e3bcb
Prevent segfault when running selection disambiguation menu.
2019-04-23 10:59:07 +01:00
Jeff Young
b03e9061ff
Have another go at fixing 'w' command when wire tool is already active.
2019-04-23 00:11:26 +01:00
Jeff Young
f6d0166584
Don't exit wire tool at end of wire.
...
Fixes: lp:1825871
* https://bugs.launchpad.net/kicad/+bug/1825871
2019-04-22 22:13:47 +01:00
Jeff Young
1a007c3e4b
Implement SCH_SELECTION_TOOL (but still with legacy semantics).
2019-04-22 22:08:18 +01:00
Jeff Young
8e812c012d
Second activation of wire or bus tool should start drawing.
...
Fixes: lp:1825871
* https://bugs.launchpad.net/kicad/+bug/1825871
2019-04-22 22:08:18 +01:00
Jeff Young
64ba866146
Fix ignoreMouseEvents getting stuck in drawing tool.
...
Fixes: lp:1825613
* https://bugs.launchpad.net/kicad/+bug/1825613
2019-04-22 09:32:57 +01:00
jean-pierre charras
6e8dd598c0
Minor fixes in translatable strings. Fix also a minor compil warning.
2019-04-22 09:34:28 +02:00
Simon Richter
ed4c9f7ddb
Use format string for composed strings
...
Some translations may need this.
2019-04-20 22:01:43 +01:00
Jeff Young
f2d9887409
Make usage of BRIGHTENED consistent (m_Flags, not m_Status).
2019-04-19 17:19:41 +01:00
Jeff Young
e9c1cd2371
Fix duplicate hotkeys.
2019-04-19 01:07:36 +01:00
Jeff Young
d88126e519
Tidy up and fix end sheet command.
2019-04-19 01:00:54 +01:00
Jeff Young
f274e0f68b
Move some more immediate actions to modern toolset.
2019-04-19 00:42:50 +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
ecfa05e2ca
Allow adding symbols/footprints from editors and browsers.
...
This was always possible from modal browsers and from the footprint
editor, but it's now also possible from non-modal browsers and the
symbol editor.
Fixes: lp:920380
* https://bugs.launchpad.net/kicad/+bug/920380
2019-04-16 16:20:51 +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