Commit Graph

71 Commits

Author SHA1 Message Date
Seth Hillbrand 5975524826 Fixup PCB_ONE_LAYER_SELECTOR
It is useful to be able to tell which layer you are selecting.  The
checkboxes, on the other hand, provide no information when dealing with
a single layer selection
2021-09-22 15:57:27 -07:00
Wayne Stambaugh 1a301d8eea Stop using wxDialog::EndModal() from inside dialogs.
Calling wxDialog::EndModal() directly from inside the dialog is a
potential bug if the dialog is shown in the modeless or window modal
(quasi-modal).  Use the internal button events where possible and
check for the appropriate mode before calling the correct end dialog
function.
2021-07-21 17:38:14 -04:00
Marek Roszko 6e874265fa Autosize all of the layer columns to ensure dpi match
Fix #8202
2021-04-29 20:01:07 -04:00
Jeff Young 45b2bce698 Cancel placement of via if user cancels layer selection.
Fixes https://gitlab.com/kicad/code/kicad/issues/7578
2021-02-18 11:53:36 +00:00
jean-pierre charras 5d2dc0b50e Fix a few (minor) issues:
- Make DIALOG_SHIM::SetPosition working)
- rename PCB_BASE_FRAME::SelectLayer() to PCB_BASE_FRAME::SelectOneLayer()
- PCB_BASE_FRAME::SelectOneLayer(): make dismiss dialog by escape key working.
Fixes #7578
https://gitlab.com/kicad/code/kicad/issues/7578
2021-02-17 20:56:43 +01:00
Jeff Young f372c8025b Better sizing for some conditional dialogs.
These dialogs don't have growable features but do have conditional
features, so the size is better adjusted automatically by the code
then by the user.
2021-01-07 01:27:12 +00:00
Jeff Young 84dd5108ba Remove some "class_" prefixes from files. 2020-11-13 15:16:23 +00:00
jean-pierre charras 13304d0870 more cleanup about removing useless include 2020-10-02 13:40:00 +02:00
Jon Evans f2e003147e ADDED: Enable color themes for PcbNew printing 2020-05-16 13:19:43 -04:00
Jeff Young 67bccaf465 Make indeterminate control states clearer for the user.
Fixes https://gitlab.com/kicad/code/kicad/issues/4313
2020-05-05 20:26:51 +01:00
Jon Evans e59a3d981e Implement a new settings framework across all of KiCad
CHANGED: Settings are now stored in versioned sub-directories
ADDED: First-run dialog for migrating settings from a previous version
CHANGED: Settings are now stored as JSON files instead of wxConfig-style INI files
CHANGED: Color settings are now all stored in a separate settings file
CHANGED: The symbol editor and footprint editor now have their own settings files
CHANGED: Color settings are no longer exposed through BOARD object
CHANGED: Page layout editor now uses Eeschema's color scheme

Settings are now managed through a central SETTINGS_MANAGER held by PGM_BASE.
Existing settings will be migrated from the wxConfig format on first run of each application.
Per-application settings are now stored in one class for each application.
2020-02-19 23:44:56 -05:00
Seth Hillbrand 7c28c3838a Comment-only changes
Makes class comments conform to coding standards
2020-01-10 16:43:01 -08:00
jean-pierre charras dc69cac298 Try to fix UI issues in select layer pair dialog and slect layer dialog.
Fixes: lp:1838173
https://bugs.launchpad.net/kicad/+bug/1838173
2019-07-28 12:54:59 +02:00
Jeff Young 3912c7407f Move global commands to ACTIONs.
Also fixes a crash bug opening Edit Tracks and Vias dialog.
2019-06-03 21:08:30 +01:00
Jeff Young c2662b0e11 Retire EDA_DRAW_PANEL and legacy_wx/EDA_DRAW_FRAME. 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
Jeff Young 666da3849b Make esc dismiss net and layer selector popups. 2018-09-22 16:23:13 +01:00
Jeff Young fb21069c5a Refresh layer selection dialogs.
Use platform-native widgets to show selection and draw layer
colours over the PCB background colour.

(cherry picked from commit 4f95f7f)
2018-07-17 15:13:24 +01:00
Seth Hillbrand 3ce8a4856a Remove ToLayer_ID calls from color checks
Colors are assigned to virtual layers while the ToLayer_ID returns a
physical layer enum.  The GetLayerColor/SetLayerColor take LAYER_NUM
(int) values that can be larger than the physical layer count.
2018-05-30 13:51:20 -07:00
jean-pierre charras 39b4afecfa fix code after file renaming 2018-01-31 09:24:02 +01:00
jean-pierre charras 5d72aebd22 Fix code after renaming files 2018-01-29 16:40:22 +01:00
Tomasz Włostowski 32185ddcd3 Multiple improvements concerning colors, configuration handling and legacy features in pcbnew:
- support for background color setting
    - removed several global config settings (such as g_Drc_On)
    - wrapped most of global config settings in PCB_GENERAL_SETTINGS class
    - reorganized PCB general options dialog to clearly mark which options concern only the legacy canvas
    - new GAL feature for legacy users: double-click (or E) to change track width available as an option.

Fixes: lp:1530543
* https://bugs.launchpad.net/kicad/+bug/1530543

Fixes: lp:1707145
* https://bugs.launchpad.net/kicad/+bug/1707145
2017-08-04 16:06:57 +02:00
Jon Evans 3ec28e2acf Refactor layer enumerations to all live in the same place 2017-03-30 16:01:48 -04: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
Simon Richter ad088db6d2 Add more "override" markers. 2016-09-25 13:59:41 -04:00
Simon Richter 59c81976dc Explicitly mark overriding functions. 2016-09-24 14:53:15 -04:00
jean-pierre charras 5a38d2b657 Rework on env. variable KISYS3DMOD. Until now, was used in different files using different ways, so no consistency between files.
code cleanup.
2014-08-24 09:05:07 +02:00
Dick Hollenbeck ad750defb6 LAYER_ID work 2014-06-29 08:05:51 -05: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
jean-pierre charras 335f5a57e5 Pcbnew: fix an issue with very old .brd files. 2014-06-06 12:30:07 +02:00
jean-pierre charras daeeee5617 Eeschema: Rework on netlist generator: code clenenig and enhancement.
Fix an annoying issue about not named nets:
now, these nets are named from the component references and pin names which are connected.
therefore, unless the net or the footprint references are modified, the net name is not modified between 2 netlist calculations.
2013-09-25 21:09:57 +02:00
jean-pierre charras 0ae31f3ecb Pcbnew: better dialogs to select the active layer or a layer pair. Add an option (hotkey+popup menu) to place a via and select the new active layer
(useful for boards having more than 2 layers)
Eeschema:fix compatibility with old schematic files, when they  contain ERC markers.
Pcbnew: better test for allowed layers when creating/editing Dimensions and some other Graphic items
Drc:  fix comments and messages for some drc tests.
Fix minor bugs in cleanup dialog options and plot solder mask function (thanks to Lorenzo to locate these bugs)
2013-09-20 12:52:33 +02:00
jean-pierre charras c029dc398b Eeschema: fix compatibility with old schematic files, which can contain markers.
Pcbnew: better test for allowed layers when creating/editing Dimensions and some other Graphic items
Drc: fix comments and messages for some drc tests.
To do: fix issues in active layer selection when creating a track and layer pair selection dialog
2013-09-11 17:30:21 +02:00
jean-pierre charras 36ae78ff94 pcbnew: fix wxWidgets 2.8 compatibility issue (temporary fix, still have a minor cosmetic issue), and add missing file. 2013-09-03 21:37:52 +02:00
jean-pierre charras 6c14eee672 Pcbnew: Redesign layer selection and layer pair selection (give them a look near the Layer selector in toolbarr) 2013-08-30 21:28:31 +02:00
Lorenzo Marcantonio 204d085b64 More cleanup on layer code usage
Better description for entities on right click menu and panel
Typo fixes and some comment reformats
2013-04-07 13:55:18 +02:00
Lorenzo Marcantonio 150cfebb59 Fixed some tab-induced disalignments
Charras beat me on fixing the include/sch_item_struct.h include issue from 4069
2013-04-06 14:28:02 +02: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
Wayne Stambaugh c2e5fcaec8 More encapsulation improvements.
* EDA_DRAW_FRAME completely encapsulated.
* Encapsulate the the low hanging fruit in EDA_DRAW_PANEL.
2011-12-22 08:28:11 -05:00
jean-pierre charras e8c3ca2929 Pcbnew: remove global variables (g_TabOneLayerMask and g_ViaType_Name) 2011-12-06 09:35:13 +01: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 726d772cfa Pcbnew: Fix a refresh issue when changing active layer (Windows only)
Fix 2 very minor issues.
2011-09-19 18:29:46 +02:00
jean-pierre charras 57604b0a03 Gerbview: export_to_pcbnew enhancement and fixes. 2011-04-26 10:30:16 +02:00
Wayne Stambaugh fe6890a955 Dialog escape key termination and default button fixes.
* Fix about dialog escape key termination bug.
* Fix edit hot keys dialog escape key termination bug.
* Set schematic editor component properties dialog default button.
* Fix schematic editor plot DXF dialog escape key termination bug.
* Set PCB editor layers setup dialog default button.
* Set PCB editor swap layers dialog default button.
* Set PCB editor net list dialog default button.
* Add comment to UIPolicy.txt about escape key termination requiring proper
  dialog button IDs.
2011-03-14 15:17:42 -04:00
Wayne Stambaugh 283cfa67ff Set default button on all dialogs. Fixes lp:665703
* Set default button on all dialogs that do not already have a defined
  default button.  The only exception is the EESchema net list dialog
  which needs converted over to wxFormBuilder and due to it's design makes
  setting the default button in any tab other than the default tab
  problematic.
* Fix escape key dialog handling bug in EESchema print post script
  dialog.
2011-03-14 11:17:18 -04: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
Wayne Stambaugh bdca3c5efb All control state handling is now performed in wxUpdateUIEvent handlers.
* Old control state handling code completely removed in all applications.
* Factor common control state handlers into EDA_DRAW_FRAME.
* Replaced EDA_ITEM test for newness with IsNew() method.
* Factor vertical right toolbar command handlers out of giant edit command
  switch statement in EESchema and PCBNew.
2011-02-21 08:54:29 -05:00
Wayne Stambaugh 7b8b51b240 Draw panel object refactoring and other minor code cleaning.
* Rename all member variables and methods that reference the cross hair
  code in draw panel object from cursor to cross hair to eliminate confusion
  between the two concepts.
* Rename cursor capture call backs in draw panel object to improve code
  readability.
* Create helper class for turning off the cross hair while drawing.
* Remove redundant block clear code.
* Remove redundant mouse capture call back reset code when end capture
  call back is called.
* Remove unused function definitions in base draw frame object.
* Lots of minor coding policy and doxygen comment fixes.
2011-02-11 15:48:13 -05:00