Commit Graph

122 Commits

Author SHA1 Message Date
Jeff Young b10f337299 Don't auto-zoom when page settings were cancelled.
Fixes https://gitlab.com/kicad/code/kicad/issues/8978
2021-09-17 12:37:53 +01:00
Wayne Stambaugh 04c6b79350 Eeschema: remove unused and unnecessary code.
When swapping SCH_SYMBOL objects during undo, no special processing is
required.  The SCH_PIN objects are updated when the LIB_SYMBOL objects
are swapped and the call to SCH_SCREEN::SwapSymbolLinks() didn't do
anything.
2021-08-11 14:30:29 -04:00
Wayne Stambaugh fbc135e69f Rename SCH_COMPONENT to SCH_SYMBOL. 2021-06-10 10:34:49 -04:00
Jeff Young 42eae27551 Rebuild selection after heavy lifting.
Undo does some fairly major redraws (including setting the current
screen), all of which drop the selection and cancel interactive tools.
Make sure the selection is re-built *after* all those run.

Fixes https://gitlab.com/kicad/code/kicad/issues/8492
2021-05-27 14:25:37 +01:00
Roberto Fernandez Bautista 5822cd85c4 Fix eeschema copy/paste: save and load sheet and symbol instances
Save sheet and symbol instance information to the clipboard on copy

Load sheet and symbol instance information from the clipboard on paste
and renumber page numbers after loading.

Correctly handle pasting in a multiple hierarchy by ensuring symbol and
sheet instances are updated for all instances of the destination sheet.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8207
2021-05-03 19:38:31 +01:00
Wayne Stambaugh 7a00e01b3e Eeschema: fix false positive library symbol changed ERC errors.
This fix required sorting all of the LIB_PART draw items to ensure
accurate comparison between the symbols stored in the schematic and the
original library symbols.  This has a noticeable impact on symbol library
load performance.  It may also cause significant changes the next time
the library is saved due to changes in the draw item sorting.  Hashing
may be a better solution here but this addressed the immediate problem.

A skeleton method SCH_SCREEN::SwapSymbolLinks() was added because there
is most likely an issue with orphaned symbols in the schematic library
symbol cache during undo/redo operations.  More testing is required to
verify this.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/7263
2021-03-04 17:59:24 -05:00
Jeff Young a3b9e8ddb4 Round 2 of Worksheet -> Drawing Sheet. 2021-02-23 11:57:44 +00:00
Seth Hillbrand 24795f5b12 Fix overzealous breakSegments()
We cannot break segements that are merely close or on endpoints, so we
filter these prior to the break routine.  Failing to do this was
overloading our undo stack with bogus values

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

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

Fixes https://gitlab.com/kicad/code/kicad/issues/7554
2021-02-16 10:12:30 -08:00
Jeff Young cf42d692bf Remove some dead code. A little bit of comment cleanup as well. 2021-02-15 14:13:43 +00:00
Seth Hillbrand 4f1592e5c1 Fix crash with empty undo stack 2021-02-13 06:41:10 -08:00
Seth Hillbrand 02c7fcdc84 Fix BreakWire tool
Adds ability to start new commit to eeschema, allowing all
AddItemsToUndoList to always append without foreknowledge.  Keeps newly
split wires on the tool until placed

Fixes https://gitlab.com/kicad/code/kicad/issues/7512
2021-02-12 17:17:12 -08:00
Seth Hillbrand 8c2fe42ef0 More Undo/Redo Cleanup.
Don't need the reference point or container action type.  Clearing this
command signatures to prevent future confusion/use
2021-02-12 11:26:48 -08:00
Seth Hillbrand d244c09680 Cleanup undo/redo
Mirror/Rotate/etc were all just "Change" items in the undo/redo stack.
This removes the old calls
2021-02-12 10:25:14 -08:00
Jeff Young 7a41ff74df Fix undo of DeMorgan conversion. 2020-10-21 00:04:04 +01:00
Wayne Stambaugh 8ff51d8899 Eeschema: add schematic sheet page number.
The groundwork has now been laid for per sheet instance data.  Initially
this only supports sheet page numbers but could be expanded to include
other per sheet instance information.

ADDED: Support for user defined schematic page numbers.
2020-10-19 14:05:45 -04:00
Marek Roszko 2c86363aa0 Relocate the page_layout includes to a page_layout folder 2020-10-13 20:33:33 -04:00
jean-pierre charras 7865d8de43 more cleanup about removing useless include 2020-10-02 15:50:46 +02:00
Mark Roszko 1082402b33 Convert UNDO_REDO_T to an enum class 2020-08-26 18:04:32 +00:00
Jeff Young 1cd2a51db2 Make undo/redo lists protected. 2020-07-13 15:53: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
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
Jeff Young b6b26b4e1e Add some defensive code to prevent crash when no undo record is stacked.
Fixes: lp:1838843
* https://bugs.launchpad.net/kicad/+bug/1838843
2019-08-03 17:20:54 -06:00
Jeff Young 1bf04d1722 More ACTIONs work. 2019-06-04 00:51:16 +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
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 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 32765ebffd Do some refactoring in prep for sharing some sch tools with libedit. 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 8c00dac3c7 Add modern toolset notification to eeschema undo/redo. 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
Seth Hillbrand 822cd9c6ef eeschema: Remove UR_WIRE_IMAGE
The wire image undo/redo option required special handling and was only
used in a single location.  Replacing with single change handling
reduces the code complexity
2019-04-13 07:11:24 -07: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
Seth Hillbrand ea84020b1f eeschema: Recache bitmaps when changing
Clearing the cache removes all items from screen until the cache is
refreshed.  Instead, we wanted to re-cache the items to take into
account the bitmap changes.

Fixes: lp:1815443
* https://bugs.launchpad.net/kicad/+bug/1815443
2019-02-12 08:16:23 -08:00
Jeff Young 10887868dc More changes to clean up redraw after an undo.
Fixes: lp:1803038
* https://bugs.launchpad.net/kicad/+bug/1803038
2018-12-22 22:13:23 +00:00
Jeff Young 6eca924365 Clear hidden flags on undo.
Fixes: lp:1803038
* https://bugs.launchpad.net/kicad/+bug/1803038
2018-12-21 16:39:10 +00: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 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
jean-pierre charras 1a0f3b79cc Fix SCH_BITMAP handling in gal. 2018-10-09 11:08:56 +01:00
Jeff Young 7216eda202 Fix bugs in block operations.
1) when duplicating don’t keep original hidden until end of drag
2) reset selectionArea when showing it so it doesn’t flash in its previous location
3) center a pasted block on the cursor
4) don’t draw the source selectionArea when pasting a block
5) implement selection-style highlighting for contents of blocks
6) add pasted items to view so they don’t disappear when the block is placed

Fixes: lp:1747197
* https://bugs.launchpad.net/kicad/+bug/1747197
2018-10-09 11:08:55 +01:00
Jeff Young cb8e6c0df5 Handle GAL view refresh for breaking wires. 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 49ea6e1670 Fix occurrences of "edition" which should be "editing"
Fixes: lp:1778168
* https://bugs.launchpad.net/kicad/+bug/1778168

(cherry picked from commit bcb1220)
2018-07-17 15:12:39 +01:00
jean-pierre charras 8022f1cc01 fix code after renamin files 2018-01-30 11:49:51 +01:00
Seth Hillbrand f8e0099ecc Eeschema: Add 'append' option to undo
Allows eeschema to add elements to previous undo commits,
permitting stacking of changes through multiple calls
2017-11-30 10:01:15 -05:00
Maciej Suminski 2ed19668cd Eeschema: removed protos.h
Contained duplicated function declarations with invalid comments.
2017-11-21 23:18:55 +01:00
Wayne Stambaugh 427e5ec461 Eeschema: fix crash when undo called during item edit.
Add EDA_DRAW_FRAME::isBusy() method to test if the current item is being
edited or a block operation is in progress.

Ignore undo and redo commands when editor is busy.

Fixes lp:1718656

https://bugs.launchpad.net/kicad/+bug/1718656
2017-09-21 12:37:52 -04:00
Maciej Suminski b5bfa14057 Removed unused EDA_ITEM::m_Image field. 2016-09-12 11:50:06 +02:00
Mark Roszko 33419ee4bf Eeschema: remove unused headers, unused variables, redundant casts, and minor boolean tweaks. 2015-11-03 14:44:05 -05:00
jean-pierre charras c6f4f15926 Eeschema: Minor code reorganization:
* move not shared files (sch_item_struct.*, sch_base_frame.h) to eeschema;
* move wxEeschemaStruct.h to eeschema and rename it schframe.h to be consistent with the other corresponding file name schframe.cpp;
* remove few not needed  #include
2015-02-21 10:46:44 +01:00