Commit Graph

68 Commits

Author SHA1 Message Date
Jeff Young f221220fe2 Rename layer ids file.
It hasn't had anything to do with colors or visibility for some time
now.
2021-07-29 16:03:25 +01:00
Wayne Stambaugh 2a6c7a7c0f Pcbnew header housekeeping round 1. 2021-06-04 09:08:38 -04:00
Jeff Young 91421f9908 Separate logic for multi-select and click-select when filtering.
Also removes a bunch of old implementations of pad locking and
filtering which are no longer needed.  (They're now handled by the
uniform locking code.)

Also removes some of the auto-promotion logic.  Rotating a footprint
when a pad was selected is going to be surprising whether the pad
is locked or not.

Fixes https://gitlab.com/kicad/code/kicad/issues/8322
2021-04-29 00:07:35 +01:00
Mikołaj Wielgus 3e42ba18a9 Show dragging tools in context selection menu for components
Show the dragging tools in the context selection menu when a single
component is selected. Prevent the dragging tools from appearing when
more than one object is selected, as they will not activate anyway.

Fixes https://gitlab.com/kicad/code/kicad/issues/7258
2021-01-27 19:55:42 +00:00
Jeff Young ffdff21f45 Use a sloppier hittest for the collector as well as the actual hittest.
Fixes https://gitlab.com/kicad/code/kicad/issues/7079
2021-01-13 21:22:24 +00:00
Jeff Young 896ad4a749 Rewrite PCBNew selection disambiguation based on shapes.
The new shape architecture gives us the opportunity to make text
selection much more intuitive by actually looking at the glyph
shapes.  Before text would be selected when you clicked in the
descenders area (which was usually blank given uppercase letters
and digits).

Fixes https://gitlab.com/kicad/code/kicad/issues/6525
2020-11-27 22:03:14 +00:00
Jeff Young 666c11965a Clean up some more MODULE terms. 2020-11-14 19:56:06 +00:00
Jeff Young 7bd31d5237 Naming conventions. 2020-11-14 18:26:03 +00:00
Jeff Young 86b6afd14b More cleanup of MODULE to see if it fixes SWIG error. 2020-11-13 21:07:36 +00:00
Jeff Young bdbb68f813 MODULE -> FOOTPRINT. 2020-11-13 16:04:03 +00:00
Jeff Young 522d64968e Yet more module -> footprint. 2020-11-13 15:16:24 +00:00
Jeff Young a3a9ef4f32 Naming conventions. 2020-11-13 15:16:24 +00:00
Jeff Young f5443de7f9 D_PAD -> PAD. 2020-11-13 15:16:24 +00:00
Seth Hillbrand f8a4edb1c9 First pass renaming module to footprint
This is mostly in comments and the few remainin text strings that
reference module
2020-10-20 20:49:11 -07:00
Jeff Young 4c5db9681c Naming conventions. 2020-10-02 21:25:14 +01:00
Jon Evans 76c4c959e6 Implement new dimension properties
- Automatic units mode (follow UI units)
- New text and number formatting options
- Automatic/manual text orientation control
- New text positioning options (inline and manual)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4280
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4497
2020-09-11 21:12:36 -04:00
Jeff Young 93e3268030 OnPixelInUI is meant to be a scaling factor, not a vector.
Fixes https://gitlab.com/kicad/code/kicad/issues/4669
2020-08-01 00:24:26 +01:00
Jeff Young 718ad77891 Fix a bug introduced when UseGalCanvas() no longer switches.
We still need to setup the viewport the first time.
Also removes some more legacy editing code.
2019-05-27 18:47:20 +01:00
Jeff Young 1a007c3e4b Implement SCH_SELECTION_TOOL (but still with legacy semantics). 2019-04-22 22:08:18 +01:00
Jeff Young 208622699f Scale zone hit area by zoom.
Fixes: lp:1803362
* https://bugs.launchpad.net/kicad/+bug/1803362
2018-11-17 00:35:07 +00:00
Jeff Young 62e2fe8bbd Recurse for more detailed selectability tests.
Fixes: lp:1801709
* https://bugs.launchpad.net/kicad/+bug/1801709
2018-11-11 20:26:19 +00:00
Jeff Young 569d4a0f64 More selection logic improvements.
Separate out zone edges (which are quite specific, and should
win over most other things) from zone fills (which are pretty
generic and should only be considered when there's nothing else).

Also excludes zone fills when the zones aren't being shown as
filled.
2018-11-02 23:52:00 +00:00
Seth Hillbrand 502383b759 pcbnew: Adjust selection behavior in highlight net
Prefer non-zones in highlight net in the same way we do for the
selection tool.  Highlight net just has separate logic and was missed
previously.
2018-10-05 21:20:26 -07:00
Seth Hillbrand 76d3b6f04a Adding locking to the context menu for modules
Locking submenu was activated only for tracks and via but it makes sense
(and is probably expected) when right-clicking on modules as well.
2018-05-02 08:35:53 -07:00
Andrzej Wolski 2e42d5c006 Do not allow selecting tracks if they are hidden
This is a complementary patch to dbafdd39.
2018-02-22 17:31:18 +01:00
jean-pierre charras 821668d96c rename class_collector.h to collector.h 2018-02-04 10:49:37 +01:00
Jon Evans 2b2612120c Filter via selection based on render settings
Fixes: lp:1743894
* https://bugs.launchpad.net/kicad/+bug/1743894
2018-01-18 09:56:43 +01:00
Wayne Stambaugh ded4ad9b17 Pcbnew: delete objects from removed layers.
This fixes potential DRC false positive bugs that occur when inner layers
are removed from the board but the actual objects on contained on those
layers remain in the board.

Since Pcbnew does not handle odd number layers, this is not a perfect fix.
When the user chooses the front or back layer only options from the layer
setup dialog, objects on the copper layers will not be removed.  This will
not cause the false positive issue described above.

Get rid of dialog OK and cancel button event handlers and use the proper
TranferData(To/From)Window for handling control data.

Add PCB_LAYER_COLLECTOR for collecting board objects by layer.  Factor out
redundant [] operators into base PCB_COLLECTOR object.

Fixes lp:893950

https://bugs.launchpad.net/kicad/+bug/893950
2017-09-28 13:01:09 -04:00
Jon Evans 3ec28e2acf Refactor layer enumerations to all live in the same place 2017-03-30 16:01:48 -04:00
Simon Richter 59c81976dc Explicitly mark overriding functions. 2016-09-24 14:53:15 -04:00
Dick Hollenbeck c2b8a4ee43 Move from class INSPECTOR as the EDA_ITEM::Visit() callback interface to a std::function
callback.  This improves conciseness and encourages use of Visit() due to the lower cost
of entry in C++.
2016-07-12 15:05:54 -04:00
jean-pierre charras 4def0958a5 Fix some coverity warnings. Fix typo and errors in comments. Very minor other fixes. 2015-04-03 11:13:06 +02:00
jean-pierre charras 9004ed8801 Remove a few coverity warnings. Fix some comments which were incorrect, due to the changes in code. Remove not compiled code (kept as comments), now outdated or useless
legacy plugin: better compatibility with old brd files (current track width and current vias size, stored in SETUP section, were not read from file and incorrectly set)
2015-03-13 17:48:42 +01:00
Lorenzo Marcantonio 0da38e5b62 More work on module texts, and especially on the collector
The members SetIgnoreMTextsOnCopper, SetIgnoreMTextsOnCmp,
SetIgnoreModulesOnCu, SetIgnoreModulesOnCmp in the collector guide are
renamed to the clearer SetIgnoreMTextsOnBack, SetIgnoreMTextsOnFront,
SetIgnoreModulesOnBack, SetIgnoreModulesOnFront

Modified the collector and drawing behaviour for text in modules as
discussed in the mailing list.

* Now module text on layers different than Silk should work! *

Still need UI support for setting the layer in the module editor.
2014-09-11 18:35:19 +02:00
Dick Hollenbeck 7e483f69bd Modular KiCad Blueprint Milestone B), major portions:
*) When kicad.exe closes a project, close any open KIFACEs so that they cannot
     get disassociated from their true PROJECT.
  *) Allow loading eeschema library editor from kicad.exe
  *) Allow loading pcbnew library editor from kicad.exe
  *) Rename LIB_COMPONENT to LIB_PART.
  *) Add class PART_LIBS, and PART_LIB.
  *) Make PART_LIBS non-global, i.e. PROJECT specific.
  *) Implement "data on demand" for PART_LIBS
  *) Implement "data on demand" for schematic SEARCH_STACK.
  *) Use RSTRINGs to retain eeschema editor's notion of last library and part being edited.
  *) Get rid of library search on every SCH_COMPONENT::Draw() call, instead use
     a weak pointer.
  *) Remove all chdir() calls so projects don't need to be CWD.
  *) Romove APPEND support from OpenProjectFiles().
  *) Make OpenProjectFiles() robust, even for creating new projects.
  *) Load EESCHEMA colors in the KIWAY::OnKiwayStart() rather in window open,
     and save them in the .eeschema config file, not in the project file.
  *) Fix bug with wxDir() while accessing protected dirs in kicad.exe
  *) Consolidate template copying into PROJECT class, not in kicad.exe source.
  *) Generally untangle eeschema, making its libraries not global but rather
     held in the PROJECT.
2014-08-13 15:28:54 -05:00
Maciej Suminski 6d1417bafa SELECTION_TOOL in edit module mode does not try to select MODULEs. 2014-07-09 13:50:27 +02:00
Dick Hollenbeck 4578ea8b9e 1) Add 32 Cu Layers.
2) Change from legacy Cu stack to counting down from top=(F_Cu or 0).
   The old Cu stack required knowing the count of Cu layers to make
   sense of the layer number when converting to many exported file types.
   The new Cu stack is more commonly used, although ours still gives
   B_Cu a fixed number.
3) Introduce class LSET and enum LAYER_ID.
4) Change *.kicad_pcb file format version to 4 from 3.
5) Change fixed names Inner1_Cu-Inner14_Cu to In1_Cu-In30_Cu and their
   meanings are typically flipped.
6) Moved the #define LAYER_N_* stuff into legacy_plugin.cpp where they
   can die a quiet death, and switch to enum LAYER_ID symbols throughout.
7) Removed the LEGACY_PLUGIN::Save() and FootprintSave() functions.
   You will need to convert to the format immediately, *.kicad_pcb and
   *.kicad_mod (=pretty) since legacy format was never going to know
   about 32 Cu layers and additional technical layers and the reversed Cu
   stack.
2014-06-24 11:17:18 -05:00
Lorenzo Marcantonio 9fd79dfa91 Implemented the LAYER_NUM typedef (LAYER was already taken as a class name...) to represent a layer number. 2013-03-31 15:27:46 +02:00
Lorenzo Marcantonio e0303a4558 - New typedef LAYER_MSK to encapsulate a layer bitmap
- Renamed ReturnMaskLayer to GetLayerMask (since it's a plain getter)
2013-03-30 18:24:04 +01:00
Dick Hollenbeck b8a0ab4c52 switch to <> for includes from "" per conversation with Jean-Pierre and Wayne, adjust search paths 2012-01-22 22:33:36 -06:00
Guillaume Simard cc70c1a463 fix 2011-12-14 16:35:03 -06:00
Wayne Stambaugh c2f1113e5d Fix Pcbnew KICAD_T enum names for consistency. 2011-10-01 15:24:27 -04:00
Wayne Stambaugh 4b853dedb4 Application name capitalization fixes.
* Correct all user strings and comments for the correct capitalization of
  application names according to JP.  They are KiCad, Pcbnew, CvPcb,
  Eeschema, and GerbView.
* Add a note the the user interface policy about the correct capitalization.
2011-09-30 14:15:37 -04:00
Wayne Stambaugh edd35b4e90 PCB common library header rationalization.
* All header files used to create the PCB common library now compile as
  stand alone code.  This prevents the need to define them in a specific
  order to make source code compile properly.  It should also now be
  possible to relocate the source code to build the common PCB library
  to a separate folder.
2011-09-23 09:57:12 -04:00
jean-pierre charras 045ba78d46 Pcbnew: fix RDC error, for DRC between a an OVAL pad and an other pad.
Minor other fixes.
2011-05-12 13:06:32 +02:00
Wayne Stambaugh 1010601a78 PCBNew control update bug fixes, fixes lp:725963.
* Fix grid select box update bug on context menu.
* Fix via size and track width select box update bugs.
* Fix layer pair indicator button update bug.
* Fix auto track width tool bar control enable bug.
* Fix via size and track width select status bug in context menu.
* Fix layer select box and layer control widget select bug when current
  layer is removed.
* Add virtual function to notify objects derived from EDA_DRAW_FRAME that
  the units setting has changed.
* Coding policy class naming fixes.
2011-03-01 14:26:17 -05:00
jean-pierre charras a9010796e0 Doxygen comment warning fixes. 2010-12-29 18:47:32 +01:00
Wayne Stambaugh c79077c9a2 Minor fixes and lots of coding policy changes. 2010-12-08 15:12:46 -05:00
charras 0bf4b5ae9a Pcbnew: fixed pad selection by right click according to pad visibility. 2010-02-05 10:56:23 +00:00
charras a46cd46d9d pcbnew: More about work on color selection and items visibility:
removed global variables and a lot of redundancies
2010-01-31 20:01:46 +00:00