Commit Graph

134 Commits

Author SHA1 Message Date
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
Wayne Stambaugh aeb3281e27 Convert Schematic Internal Units to 100nm 2019-12-30 18:28:00 +00:00
Mark Roszko 11ff16be4e Switch to scoped enums 2019-12-20 14:11:39 +00:00
Jeff Young 35c8d64f98 Add super- and subscript support to Eeschema.
Note that since the markup might exist for other reasons, it has
to be turned on with a preference setting.  (It goes through a set
of bitflags so the same architecture can be used for other markup
structures that we might want to support in the future.)

Note also that this is more about engineering nomenclature than
visual formatting.  In that respect it's more similar to overbar
than italic or bold.
2019-11-05 17:22:51 +00:00
Seth Hillbrand c3226653cc eeschema: Handle broken spin style value
The spin style is stored as a numeric and can be corrupted.  We handle
this by triggering assertions for debugging the bad value while
resetting to default if we have non-valid spin values that are outside
the array.

Fixes: lp:1843091
* https://bugs.launchpad.net/kicad/+bug/1843091
2019-09-06 13:17:12 -07:00
Jeff Young 5503727d3d Fix some placement bugs with selection haloes on text.
Fixes: lp:1838841
* https://bugs.launchpad.net/kicad/+bug/1838841
2019-08-03 17:20:54 -06:00
Jeff Young 937e3c2d48 Make m_Text private so we don't keep getting bugs where m_shown_text fails to get updated.
Fixes: lp:1838655
* https://bugs.launchpad.net/kicad/+bug/1838655
2019-08-01 20:36:59 -06:00
Jeff Young daac54b5d2 Update shown text cache in undo/redo.
Fixes: lp:1837772
* https://bugs.launchpad.net/kicad/+bug/1837772
2019-07-26 23:59:05 -06:00
Jeff Young e1a22333c1 Fix bug with escaped '~' still getting extra height for overbar. 2019-07-10 11:59:09 +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
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 d6e9bdf07b Convert remaining legacy drawing code to print code. 2019-05-31 21:54:22 +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
Jeff Young 053c26c96e Refresh shown_text cache when incrementing label name.
Fixes: lp:1828874
* https://bugs.launchpad.net/kicad/+bug/1828874
2019-05-15 17:50:52 +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 f81007f74b Some clean-up and moving message panel update to selection event. 2019-05-05 17:12:59 +01:00
Jeff Young 460909ea9a Move click-to-place tools to modern toolset. 2019-04-16 16:20:52 +01:00
Jon Evans 078fdb9077 Fix rotation of global and hierarchical labels
Fixes: lp:1824432
* https://bugs.launchpad.net/kicad/+bug/1824432

(cherry picked from commit 593a5181d7)
2019-04-13 17:03:27 -04:00
jean-pierre charras 2529346940 Some fixes for I18N. Mainly do not translate debug messages or strings giving only a print format (like "%d"). 2019-04-13 10:12:24 +02:00
Wayne Stambaugh 3d33cba574 Eeschema: fix schematic text object plotting issue.
Save and restore text thickness in SCH_TEXT::Plot() function to prevent
the plotting default thickness value from stepping on the original text
thickness and causing all of the text objects to magically change to bold.

Fixes lp:1823165

https://bugs.launchpad.net/kicad/+bug/1823165
2019-04-09 10:14:32 -04:00
Jeff Young 2aad4a5e57 Remove dead code from removal of eeschema legacy canvas. 2019-04-05 15:54:31 +01:00
Jeff Young 95635804bf Replace pin mark/sweep with method that doesn't invalidate iterators.
Also removes some no-longer-used drawing code (the Draw() routines
are only used for printing with the modern eeschema canvas in place).
2019-04-04 12:08:33 +01:00
Jeff Young 81d4a45e73 Ignore BRIGHTENED state when printing.
Fixes: lp:1788480
* https://bugs.launchpad.net/kicad/+bug/1788480
2019-04-01 13:23:37 +01:00
Jon Evans 83c7e7fc65 New connectivity algorithm and bus upgrades
Bus upgrades: core new connectivity code

Bus upgrades: eeschema integration and modifications

Bus upgrades: eeschema dialogs

Bus upgrades: netlist export

Bus upgrades: file format changes
2019-03-31 19:53:41 -04:00
Seth Hillbrand 8d777dd5c3 eeschema: Take stroke thickness into account
Spacing text for plotters uses the thickness of text for two separate
classes.  This sets the thickness in the EDA_TEXT class as well to allow
the multiple line positions to be correctly set

Fixes: lp:1799605
* https://bugs.launchpad.net/kicad/+bug/1799605
2019-01-25 14:22:19 -08:00
Jeff Young e715835c29 Copy dangling flag when cloning.
Fixes: lp:1804005
* https://bugs.launchpad.net/kicad/+bug/1804005
2018-11-19 19:07:40 +00:00
Jeff Young 4030eec939 Implement proper dangling end handling for block moves.
(Most of this is actually fixing the IsDanglingStateChanged() to
correctly indicate that it *updates* the dangling state, not just
tests it.)
2018-10-30 11:33:49 +00:00
Jeff Young 1baa904034 Dangling symbol fixes.
No dangling symbol for text items with a NO-CONNECT.
DanglingStateChanged doesn't work with dangling flag aggregators
(which return true if any child is dangling).
Then again, we don't actually use any of the aggregators anyway
so I removed them.

Fixes: lp:1799589
* https://bugs.launchpad.net/kicad/+bug/1799589
2018-10-24 23:51:18 +01:00
Jeff Young 0af31e1bf0 Fix CLangTidy warnings and improve SNR. 2018-10-09 11:08:56 +01:00
Jeff Young a67d8c60df Fix text size measurement.
5.0 doesn't set the GAL's line width.  It gets away with this since
it's using the same GAL to measure as to set up the drawing, so
the width happens to be set correctly for other reasons.  5.1 uses
a separate GAL and so isn't so lucky.
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 eacaa39aa2 Remove global units usage from GetSelectionText...
... and GetMsgPanelInfo.

Step 4 in the g_UserUnit eradication effort.

Also removes a couple of conversion routines that were close
enough to extinction.

(cherry picked from commit c75da51)
2018-07-17 15:11:09 +01:00
Jeff Young b99ea159c8 Rationalize select menu texts.
Be consistent with order, formatting, etc.
Remove debug stuff such as zone timestamp and net code.
Clean up misleading pad messages.

(cherry picked from commit 2132109)
2018-07-17 15:09:48 +01:00
Jeff Young 3be876c388 Cleanup of trace logs from Simon Richter. 2018-04-17 17:27:18 +01:00
jean-pierre charras 8022f1cc01 fix code after renamin files 2018-01-30 11:49:51 +01:00
jean-pierre charras 795a36c9fe Fix code after renaming files, and a bit of code cleanup (remove useless includes and multiple includes of the same files) 2018-01-30 09:57:25 +01:00
jean-pierre charras 4c5bd01887 Rename a few files 2018-01-28 22:02:31 +01:00
jean-pierre charras e499d337d8 rename files: update filenames in sources 2018-01-28 19:12:26 +01: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 a0473614b5 Remove all schematic object load and save code.
All of the schematic object load and save code is implemented in the
legacy schematic plugin so it is no longer required.

Remove unused file with old schematic file loader.

Doxygen comment cleaning.
2017-11-18 08:53:13 -05:00
jean-pierre charras bdc6a5950b rename plot_common.h to class_plotter.h, a better name, consistent with other class definitions. 2017-11-16 15:53:30 +01:00
Fabrizio Tappero ac9a64a173 general UI fix. Fixed a lot of icons and a lot of menu.
Also a few no longer used .cpp icon files are removed.
2017-06-02 11:51:11 +02:00
Maciej Suminski 0dc88bb4cf Changed COLOR4D defines to static consts 2017-02-22 17:35:00 +01:00
Jon Evans a52250a91e Change from EDA_COLOR_T to COLOR4D globally; arbitrary color support
eeschema now supports arbitrary colors for all object types, and
pcbnew does in GAL canvas.  When switching from GAL to legacy canvas,
pcbnew will convert colors to the nearest legacy color.
2017-02-22 17:35:00 +01:00
John Beard a8eea6155a Move bitmaps.h out of base_struct.h
bitmaps.h was included in nearly every file in the project due to it
being included by base_struct.h

Only about 130 files actually use the XPM definitions defined there, and
many of those already included bitmaps.h themselves, or via
menu_helpers.h. However, touching bitmaps.h would result in over 400
rebuilt files for pcbnew alone.

This commit moves the bitmap-related types like BITMAT_DEF out to a new
header, which is still included by base_struct.h, which is less
avoidable for now, it's it's used in the interface.

The icon list is still in bitmaps.h. This has the side effect that's
it's now easier to automatically generate this file.

Many classes in pcbnew and eeschema needed some functions moved
to the implementaitons from the headers too.
2017-02-21 09:50:15 -05:00
Dick Hollenbeck d0c46a81d9 SCH_TEXT::SwapData() was not swapping m_shape, causing abandoned drag to distort pinsheet.
Fixes: lp:1659683
* https://bugs.launchpad.net/kicad/+bug/1659683
2017-01-27 16:44:24 -05:00
Dick Hollenbeck 0c459ced97 EDA_TEXT object refactor.
Make all EDA_TEXT data private and rename accessors to avoid function
name collisions in derived classes.

Overload EDA_TEXT's SetTextAngle() and SetEffects() in TEXTE_PCB.

Add support for preserving Reference text position, size, orientation
during a netlist import into a BOARD, as well as the one off footprint
update dialog.
2017-01-25 08:03:32 -05:00
Nox_firegalaxy 44b8533d4d Add connection highlight to eeschema, step 1. 2016-11-16 11:07:02 +01:00
Maciej Suminski 9748b65a6d str[n]icmp -> str[n]casecmp 2016-08-11 14:41:06 +02:00