Commit Graph

100 Commits

Author SHA1 Message Date
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
Jeff Young 4f8c546140 Implement user units uniformly in EDA_DRAW_FRAME
Step 1 of the g_UserUnit global eradication.  This commit includes
basic hookup of hotkeys, units tool-buttons and grid dialogs.

(cherry picked from commit e0500ab)
2018-07-17 15:09:51 +01:00
Michael 28705d7c6d Fix up file menu and hotkeys 2018-02-18 11:22:16 -05:00
Michael 62487fa891 Fix spelling error 2018-02-15 16:46:10 +01:00
jean-pierre charras 8552f3fedf fix code after renaming files 2018-01-29 22:00:44 +01:00
Martin Sivak d5cdd78062 eeschema: keystroke zoom should obey disabled centering
Keystroke zoom (F1/F2) always centered the screen, because it
was handled as ID_POPUP_ZOOM_IN event. Mousewheel scrolling
was ok, because it is handled using different event based
on the configuration.

This patch introduces special event ids for keystroke
zooming that are then properly translated to either
ID_POPUP_ZOOM_IN or ID_OFFCENTER_ZOOM_IN depending
on the configuration.

The same issue is fixed for legacy canvas pcbnew.

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

Signed-off-by: Martin Sivak <mars@montik.net>
2018-01-27 20:20:32 -05:00
Jeff Young 7a28f3d4cf Implement undo/redo for origins in legacy
PICKED_ITEMS_LIST knows the architecture of the undo commands so
that it can delete those ITEMs which it owns.  This represents poor
encapsulation so instead of adding yet another case, I added a
UR_TRANSIENT item flag which is set by callers whenever they create
new objects to “give to” the undo/redo stack.  This allowed some
cleanup of other code, but cleaning up UR_DELETE and UR_WIRE_IMAGE
will be a bigger task and have to wait for another day.

Fixes: lp:1542018
* https://bugs.launchpad.net/kicad/+bug/1542018
2018-01-27 19:51:44 -05:00
Tomasz Włostowski b945d2a708 cleanup: replace CLASS_MIRE with CLASS_PCB_TARGET for naming clarity 2017-11-03 20:02:06 +01:00
Tomasz Włostowski 81d1e17f02 refactoring: renamed pcbstruct.h to pcb_display_options.h, DISPLAY_OPTIONS->PCB_DISPLAY_OPTIONS 2017-11-03 20:02:06 +01:00
Cirilo Bernardo e0a7f0041a Better 3D filename resolution 2016-06-09 07:48:49 +02:00
Chris Pavlina 8c01318141 Add zoom-to-selection tool 2016-06-08 07:19:53 -04:00
Wayne Stambaugh 46ff5a2580 Pcbnew: remove dead macro code. 2016-04-18 11:03:59 -04:00
Chris Pavlina fd1d7ecb6e pcbnew: fix Duplicate assertion in legacy also (lp:1558913)
Do not assert that the item to be duplicated can be duplicated, just don't
duplicate it. The user can trigger a Duplicate on items that aren't
duplicatable, like field texts - he'll figure out that they can't be duplicated
when they aren't, no need to deliver a scary warning and risk an abort.
2016-03-18 06:49:49 -04:00
Wayne Stambaugh bd800630be Pcbnew: prevent delete hot key from deleting locked footprints. (fixes lp:1538805) 2016-02-29 16:12:03 -05:00
Chris Pavlina bc614a5e0b Fix accidental string+int in a debug message 2016-01-15 22:47:47 -05:00
Chris Pavlina b30a461ee9 Pcbnew: fix Flip hotkey for blocks in legacy (fixes lp:1534120) 2016-01-14 12:52:27 -05:00
Simon Wells 415c72262a Pcbnew: use Legacy instead of Default when referring to wxDC canvas. 2015-12-22 16:25:59 -05:00
jean-pierre charras 37b0868376 Pcbnew: fix minor issues about fast grid switching, and next/previous grid selection from hotkeys. (GAL mode still has an issue) 2015-05-12 11:05:36 +02:00
Maciej Suminski da75c52665 Hot keys settings are synchronized between GAL & legacy 2015-05-05 20:39:42 +02:00
Wayne Stambaugh ec4d74c984 Minor 3D viewer improvements (fixes lp:1406680).
* Make OK button the default action in the 3D viewer option dialog per UI
  policy.
* Fix standard button sizer padding in 3D viewer options dialog.
* Let sizers do their job by using default size for 3D viewer options
  dialog.
* Set 3D viewer hot key to Alt+3 in all parent windows where 3D viewer is
  accessible.
* Minor code cleaning and coding policy fixes.
2015-03-26 15:04:52 -04:00
unknown adf2fc830e Pcbnew, legacy mode: add Hotkey for editing module with module editor (Ctrl-E) 2015-03-14 08:43:36 +01:00
jean-pierre charras c1978b3242 Pcbnew: fix crash when undoing a move exact pad in board editor.
Fix also very minor warnings detected by cppcheck.
2015-02-22 10:39:58 +01:00
John Beard 8c6313ac1a Extend arrays and duplicate to pcbnew (GAL and legacy), covering modules, text, lines, tracks, dimensions and targets.
Text arrays can now use "%s" as a placeholder to be substituted with the array index.

Also expand menu options for move exact, arrays and duplicate.

Minor fixes for arrays - use proper unit parsing, add numbering start for circular arrays

Add circle radius indicator to array dialogue
2015-02-12 03:22:24 +00:00
John Beard 4f3672da4d Add "move exact" and "duplicate" tools to pcbnew 2015-02-12 03:22:24 +00:00
jean-pierre charras 9cfb97d8b4 Add hight contrast option in Modedit. In hight contrast mode, solder masks and solder paste are shown.
this option was possible only by modifying the way display options are managed.
before these changes, display options were a global DISPLAY_OPTIONS class instance.
Now each EDA_DRAW_FRAME(and derivated classes)  includes its own DISPLAY_OPTIONS class instance.
As a consequence, some duplicate display option variables in these classes have been removed, because there were just duplicate variables of the  DISPLAY_OPTIONS class instance.
2015-01-10 11:27:49 +01:00
Nick Østergaard e373850d26 Add remove fill and fill all zones hot keys. 2014-12-06 16:21:13 -05:00
jean-pierre charras 24ed7f50f5 Pcbnew: fix Bug #1370321 (Change Segment function applies last netclass used).
Also update main toolbar track width and via size info in pns router mode, when starting a track, and other very minor update issue.
2014-09-28 16:44:47 +02:00
Lorenzo Marcantonio 424aac6cf2 TEXTE_MODULE cleanup in preparation for text on different layers
- Removed the friends MODULE and FOOTPRINT_EDIT_FRAME from TEXTE_MODULE
  (as in the @todo comment)

- Refactored the Rotate/Flip/Mirror for text in modules into the
  TEXTE_MODULE class itself (members RotateWithModule, FlipWithModule,
  MirrorWithModule)

- New behaviour in coloring text on screen: reference and value still
  take the color from the MOD_TEXT_FR_VISIBLE and MOD_TEXT_BK_VISIBLE
  visibles; other text takes the color of the layer containing it
  (except when hidden, obviously) but still get its visibility
  controlled by those visibles (probably the most intuitive and useful
  behaviour)

- Still need to decide: should text on a layer be hidden when the layer
  is? Probably yes (still to be implemented);

- Some comment fixed and many cast converted to static_cast
2014-09-10 17:18:42 +02:00
jean-pierre charras 3814cdaff1 Pcbnew: Minor fix in hotkeys. Demos: add an example to use a local fp-lib-table and local libs, and update schematics and boards. 2014-08-31 18:19:07 +02:00
Wayne Stambaugh ec9cd765bc Fix default menu alt key accelerator bug. (fixes lp:1035151)
* Add hot key handled return indicator to DRAW_FRAME::GeneralControl() and
  DRAW_FRAME::OnHotKey() and all classed derived from DRAW_FRAME.
* Add code to all GeneralControl() and OnHotKey() functions to return true if
  hot key was handled.
* Call event skip in DRAW_PANEL::OnKeyEvent() when key event is not handled to
  allow default menu event handler to function properly.
2014-08-29 16:23:40 -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
Maciej Suminski cd8aaee160 Moved most of the board design rules related fields & methods to BOARD_DESIGN_SETTINGS class. 2014-05-13 11:22:51 +02:00
Maciej Suminski 85365b0dbc Upstream merge. 2014-04-07 18:00:13 +02:00
jean-pierre charras 9b99ac2a53 All: add 2 hotkeys to simulate a mouse left click (key return) and left dclick (key end) 2014-04-03 09:40:55 +02:00
Maciej Suminski 60e9546b62 PCB_EDIT_FRAME::SetHighContrastLayer() went public.
Refactored code that handled zooming events.
Added PCB_RENDER_SETTINGS::Get/SetSketchMode().
PCBNEW_CONTROL reacts to hot keys changing display modes (sketch via/tracks, high contrast).
2014-03-24 17:20:23 +01:00
Maciej Suminski 3a43f0527f Changed void BASE_SCREEN::GetGrids( GRIDS& aList ) to const GRIDS& BASE_SCREEN::GetGrids().
Refactored:
- EDA_DRAW_FRAME::SetNextGrid() & SetPrevGrid()
- PCB_BASE_FRAME::SetFastGrid1() & SetFastGrid2()
Removed a warning from RN_DATA::updateNet(int).
2014-03-21 18:00:11 +01:00
Maciej Suminski 87c9423f0f PCB_EDIT_FRAME::SetActiveLayer() & GetActiveLayer() made public. 2014-03-21 11:17:47 +01:00
jean-pierre charras f905b4697e Code cleanup: Pcbnew: move files relative to exort functions to the new folder exporters
all: remove include <protos.h>  from a lot of  files which do not need it.
2014-01-08 15:18:51 +01:00
Maciej Suminski e13f862145 Merged upstream. 2013-10-28 21:34:06 +01:00
Wayne Stambaugh 62764cd618 Fix Pcbnew block rotate hot key and minor code cleaning. 2013-10-14 11:29:16 -04:00
Maciej Suminski 8e472c736a Merged upstream. 2013-09-20 17:54:35 +02:00
Maciej Suminski a991cb4470 Changed the way of refreshing canvases (both standard & GAL). 2013-09-20 17:29:32 +02:00
Maciej Suminski b39d562aea Restored previous function names. 2013-09-20 16:32:11 +02:00
Maciej Suminski c00533a150 Merged kicad-gal 2013-09-20 15:48:27 +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
Maciej Suminski d9ff4b851a Currently selected layer is displayed on the top. 2013-09-12 18:24:53 +02:00
Maciej Suminski ab4cb862b0 Solved refreshing issues. 2013-09-06 11:31:16 +02:00
Maciej Suminski f04df9d79c Fixed hotkeys for switching rendering backends. 2013-09-06 10:19:53 +02:00