Commit Graph

1125 Commits

Author SHA1 Message Date
Maciej Suminski ed480bbbd4 Fixed a sizer assert in pad properties dialog 2017-10-02 09:03:26 +02:00
Baranovskiy Konstantin c34955aaed Pcbnew: small fix for pad properties dialog. 2017-10-02 08:56:55 +02: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
Maciej Suminski 6006b54dd9 Fixed a crash when editing a pad of a bottom layer module
Fixes: lp:1720007
* https://bugs.launchpad.net/kicad/+bug/1720007
2017-09-28 09:58:34 +02:00
jean-pierre charras 54d34c341b Cleanup code 2017-09-28 08:38:36 +02:00
jean-pierre charras b4a59eb96d Fix minor issues in DIALOG_KEEPOUT_AREA_PROPERTIES.
Fix keepout zone creation in legacy canvas.
Add a comment in lset.cpp
2017-09-27 16:54:28 +02:00
Oliver Walters 42be6bb966 Improved keepout zone properties dialog
- Checkboxes next to layers
- OK button is disabled if no layers are selected
2017-09-27 10:35:00 +02:00
Oliver Walters 0f6ec7632b Enable multi-layer for keepout zones
- Load / save from PCB file correctly
- Doesn't display properly yet
- Keepout only actually applies to one layer (for now)
2017-09-27 10:34:59 +02:00
jean-pierre charras 8d1d37beb0 Refinements in pad properties dialog 2017-09-20 16:14:23 +02:00
jean-pierre charras 7c1ac6fbcc Refinements in pad properties dialog 2017-09-20 15:37:37 +02:00
jean-pierre charras a43f3ab1fe replace "BasicShape" by "Primitive" in code, a better name 2017-09-20 12:51:10 +02:00
jean-pierre charras 4122aa1c01 Fix translation (I18n) problems 2017-09-20 09:32:37 +02:00
Maciej Suminski cca63801bf Renamed D_PAD::{Set,Get}PadName() to D_PAD::{Set,Get}Name() 2017-09-19 18:23:50 +02:00
Maciej Suminski 85be485c34 Enable long names for pin numbers and pads
- pad names are stored as wxString instead of a char[4] & integer union
- removed pad name to string conversion functions
- fixed pad & pin properties dialog restrictions regarding the name
length
2017-09-19 18:19:49 +02:00
jean-pierre charras e2d3fcec02 Add support for custom pad shape. Full support in DRC and PnS.
add option to use shape or convex hull as clearance area in zones.
simplify code to handle clearance area
2017-09-19 09:02:53 +02:00
Mathias Grimmberger 2c23c4c3a9 Dropdown list in via properties dialog to select predefined via size 2017-09-18 10:28:08 +02:00
jean-pierre charras 50164e9968 Add Gerber job file writer in Pcbnew, and a basic reader in Gerbview. Currently disabled
Fix also very minor issues in Gerbview
2017-08-30 11:04:33 +02:00
Wayne Stambaugh 55ce984f05 Minor design rule editor dialog layout improvements.
Fix the alignment of the unit static text control for uVia diameter and
drill size to match the rest of the units static text controls on the
global design rules tab.
2017-08-29 11:15:16 -04:00
Bastian Neumann 9b900ea834 Micro via input fields are enabled when design is loaded
Loading a design with micro vias enabled did check the box for enabling
micro vias in pcbnew. The value input fields for diameter and drill
size were not enabled.

This patch moves the functionality into an new function and calls that
from the onclick event of the checkbox and the init function of the
dialog.
2017-08-29 09:28:25 -04:00
Mathias Grimmberger ffeba9de93 Change track width setting to dropbox 2017-08-25 16:46:49 +02:00
jean-pierre charras 6be2f2934e Exchange footprint dialog uses now the reporter widget for a better report of actions and errors.
Fixes: lp:1711379
https://bugs.launchpad.net/kicad/+bug/1711379
2017-08-18 20:26:45 +02:00
Maciej Suminski 077fb3c294 Clearer message for exchange footprint failure 2017-08-18 09:08:07 +02:00
Maciej Suminski 9447181a08 Handle block selection removal of libraries in FP_LIB_TABLE dialog 2017-08-15 11:56:05 +02:00
jean-pierre charras 356f607cd6 fix compil warnings and replace assert by wxASSERT in dialog_track_via_properties.cpp 2017-08-11 11:38:06 +02:00
jean-pierre charras 9485a4d381 Pcbnew, dialog export STEP: fox not working export in countries using the comma as floating point separator.
Add origin at board center and serious cleaning code.
2017-08-10 14:25:31 +02:00
jean-pierre charras 81a4182319 Fix a not easy to translate message 2017-08-10 09:48:17 +02:00
Wayne Stambaugh 15478bda41 Fix various STEP export dialog issues.
The file filter wild card was defined incorrectly causing the file picker
to not display *.stp and *.step file extensions.  Change the wildcard per
wxFileDialog documentation.

Prevent the file extension from being forced to .stp even when the user
defined a different extension in the file picker.

Override TransferDataFromWindow to test for file existence and warn user
only once if a file overwrite can occur.

Minor STEP export dialog string and layout improvements.

Make kicad2step honor user's file extension rather than always setting it
to .stp.

Fixes lp:1709636

https://bugs.launchpad.net/kicad/+bug/1709636
2017-08-09 13:41:07 -04:00
jean-pierre charras 2e96a5bc9f Pcbnew: fix a crash when editing footprint properties and trying to open the footprint 3D properties.
This was due to a missing initialization of the dummy board color settings (used to draw the footprint in the 3D view).

Fixes: lp:1708712
https://bugs.launchpad.net/kicad/+bug/1708712
2017-08-05 16:37:51 +02: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
Wayne Stambaugh 9760937494 Pcbnew: add missing file and directory overwrite prompts.
Fix the Specttra, VRML, and IDF export dialogs to prompt the user when they
are about to overwrite and existing file and/or folders.

Fixes lp:1706235

https://bugs.launchpad.net/kicad/+bug/1706235
2017-08-02 13:31:29 -04:00
jean-pierre charras 816307e500 Pcbnew plot: fix a few minor issues:
- SVG export: fix color of PCB texts.
- Avoid marking board as modified after plotting layers, when options not saved in board are modified.
2017-07-31 20:05:32 +02:00
jean-pierre charras 557e69f72a Fix many minor issues in dialog plot and plot DXF options. 2017-07-31 20:05:32 +02:00
jean-pierre charras abe2a46ae7 Pcbnew: Fix plot PDF, broken by commit f3457794cf
Also disable option to use native font in PDF and PS plotter format, because this option has never worked.

Fixes: lp:1707412
https://bugs.launchpad.net/kicad/+bug/1707412
2017-07-31 20:05:30 +02:00
Tomasz Włostowski b964569db7 pcbnew: enable net selection combobox in Track/Via properties dialog 2017-07-27 16:21:54 +02:00
jean-pierre charras 9044b5eeac Pcbnew VRML export: typing in filename textbox steals focus, making filename change very hard.
Fixes: lp:1706228
https://bugs.launchpad.net/kicad/+bug/1706228
2017-07-26 18:06:01 +02:00
Dick Hollenbeck 4e7de8a761 Reverse commit 4011ed4e31.
This commit was too broad and not cognizant of the purpose of the class
UTF8.

Add MAYBE_VERIFY_UTF8() macro, which can trap non-UTF8 encoded strings in
debug builds.

Use that macro conditionally in class UTF8 to trap non-UTF8 encoded strings
being put into UTF8 instances.
2017-07-26 08:26:56 -04:00
Fabrizio Tappero cef616fcd8 fixed text titles that should have only the first word capitilized 2017-07-21 10:19:29 -04:00
Fabrizio Tappero 269238a7ee fixes label text, now only first word is capitilized 2017-07-21 10:19:29 -04:00
Fabrizio Tappero 7be14f774d fixed plot menu labels 2017-07-21 10:19:29 -04:00
Maciej Suminski 64f00f447f pcbnew - refactor move exactly tool (3/2)
* code formatting
* turned EDIT_TOOL::getAnchorPoint() to static getAnchorPoint()
* removed unnecessary include directives
2017-07-19 11:36:35 +02:00
Robbert Lagerweij bf832dd941 pcbnew - refactor move exactly tool (1/2)
This patch does the following:
* move the determination of the origin coordinates to the dialog (reduces code duplication)
2017-07-19 11:36:35 +02:00
jean-pierre charras 22e95aab8b WIZARD_3DSHAPE_LIBS_DOWNLOADER: make it compatible with last url packages3D changes in kicad github repo 2017-07-14 13:34:42 +02:00
jean-pierre charras 2a301d5883 Fix bug: pcbnew: in Plot dialog, layer list gets duplicate after calling the drill dialog.
Fixes: lp:1703355
https://bugs.launchpad.net/kicad/+bug/1703355
2017-07-10 15:16:57 +02:00
jean-pierre charras e3d69b619f Pcbnew: fix issue in dialog_fp_lib_table: when the only changes were the plugin name, changes were not taken in account.
Because the FP_LIB_TABLE::operator == was incorrect
2017-06-30 16:03:17 +02:00
Tomasz Włostowski 113163257d Fixed compilation warnings 2017-06-23 11:36:05 +02:00
Tomasz Włostowski 3b16d3cffe further DLIST/Iterators cleanup, some code formatting 2017-06-23 11:12:37 +02:00
Tomasz Włostowski bd960f0e5c pcbnew/dialogs: more options in track/via properties window 2017-06-23 11:12:37 +02:00
Tomasz Włostowski 3cba1007eb Removed legacy connectivity/ratsnest algorithm, replaced with the new one. No legacy autorouting for the moment 2017-06-23 11:12:37 +02:00
Tomasz Włostowski 9ad886344b New connectivity algorithm. 2017-06-23 11:12:36 +02:00
jean-pierre charras 54670d6785 Pcbnew: minor fixes in DIALOG_GLOBAL_MODULES_FIELDS_EDITION.
Better code: use TransferDataFromWindow and remove wxID_OK and wxID_CANCEL custom called events.
2017-06-21 13:13:09 +02:00
jean-pierre charras 70226ecdeb Fix a few doxygen warnings 2017-06-20 10:47:30 +02:00
jean-pierre charras d6a56e5d3d fix a compil issue in a auto-generated file. 2017-06-18 22:31:26 +02:00
jean-pierre charras 8305aec8a7 Remove useless leading or trailing spaces is some translatable strings.
rename dialog_move_exact.fpb to dialog_move_exact_base.fpb (to be consistent with other .fpb file names)
2017-06-18 22:26:29 +02:00
jean-pierre charras cf5bae7fbf Fix a few doxygen warnings 2017-06-17 10:40:38 +02:00
jean-pierre charras 36e59065ff Minor fix: replace assert by wxASSERT in dialog (better to keep trace of an assert inside a wx application) 2017-06-15 13:13:25 +02:00
Maciej Suminski fc58bd3848 Position Relative Move tool fixes
- corrected copyright headers
- code formatting
- made dialog pointer private, added UpdateAnchor() and modified click
handler routine accordingly
- renamed .fbp file to match other dialogs pattern
2017-06-12 16:24:52 +02:00
Russell Oliver aeb23188f1 Add Position Relative tool 2017-06-12 16:24:52 +02:00
Wayne Stambaugh 3cec63e9b9 Pcbnew: plugin improvements.
Allow partial library reads in libraries that support footprint per file.
This includes the KiCad and GEDA footprint libraries.

Allow for partially cached libraries rather than ignoring all valid files
when an error occurs.
2017-06-11 16:21:19 -04:00
jean-pierre charras 32abc273d0 3D shapes downloader: add .step and .stp files to the list of files to download 2017-06-07 11:17:27 +02: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
jean-pierre charras b8183a1aa5 Fix Coverity warnings 2017-05-30 09:07:18 +02:00
Maciej Suminski 4336db3a7c Clear selection before 'Global Deletion' action
Fixes: lp:1690783
* https://bugs.launchpad.net/kicad/+bug/1690783
2017-05-16 09:16:12 +02:00
Eldar Khayrullin 14bb238b30 Fix typo (NTPH instead of NPTH) in DIALOG_GENDRILL_BASE. 2017-05-14 19:32:03 +02:00
Maciej Suminski b823d0b784 Use separate GAL_DISPLAY_OPTIONS instance in pad properties dialog
DIALOG_PAD_PROPERTIES disables the axis display which propagates
back to the parent frame when they share the same GAL_DISPLAY_OPTIONS
instance.

Fixes: lp:1687014
* https://bugs.launchpad.net/kicad/+bug/1687014
2017-05-12 01:01:38 +02:00
Eldar Khayrullin f3457794cf Pcbnew: add option to plot DXF editable text
Add option to plot DXF oneline ASCII text as editable text (in non-outline mode)

Fixes: lp:1423515
* https://bugs.launchpad.net/kicad/+bug/1423515
2017-05-02 15:07:19 -04:00
jean-pierre charras 000ee22e39 Drill dialog: creates the directory, when the path entered in dialog does not exist. 2017-05-01 20:42:18 +02:00
jean-pierre charras afe92c7bfc Pcbnew: Add creation of Drill Files in Gerber X2 format.
Gerbview: add support of drill files in Gerber format.
Fix also an issue in drill dialog: Axis choice is now common to plot a drill files.
2017-05-01 12:43:40 +02:00
Robbert Lagerweij e57c962336 Pcbnew: add option to select origin & anchor in move exactly tool
This patch adds a radiobox to allow the user to select a reference point for
the move. The additional options are: User Origin (set with <space>),
Grid Origin and Sheet Origin (effectively making it an absolute coordinate).

A checkbox is added (where it makes sense) to allow overriding which point
within the component is put on top of the designated coordinate.

Fixes: lp:1460460
* https://bugs.launchpad.net/kicad/+bug/1460460
2017-04-25 11:32:49 -04:00
Eldar Khayrullin 0af5695e51 Pcbnew: add option to plot DXF lines in outline mode.
Add option to plot dialog to plot DXF layers *.Cu, *.Adhes, *.Paste, and
*.Mask in outline mode or line mode.

Fixes lp:1643330

https://bugs.launchpad.net/kicad/+bug/1643330
2017-04-25 08:24:55 -04:00
jean-pierre charras b385413458 Fix tooltip errors 2017-04-22 10:26:22 +02:00
jean-pierre charras cf87536322 Fix a focus issue in dialog_edit_module_for_BoardEditor.cpp (Linux only) when creating the dialog.
It prevents ESC or ENTER keys to dismiss the dialog, until the focus is set by clicking on a widgets in the dialog.
2017-04-16 21:48:22 +02:00
jean-pierre charras 4b916b42ed dialog_edit_module_for_BoardEditor.*: fix questionable code. 2017-04-16 20:52:41 +02:00
jean-pierre charras 50fd7a27cf Fix a few coding issues in dialog_edit_module_for_Modedit.
(Mainly, remove OnOkClick and OnCancelClick to use default handlers, and use TransferDataFromWindow to update fields)
Fix also a minor issue in lib_id
2017-04-16 15:09:05 +02:00
jean-pierre charras 675eb37163 Fix a typo in a tool tip 2017-04-08 08:21:35 +02:00
Wayne Stambaugh 5dbfc02334 Board editor footprint properties dialog 3D model viewer fix.
Move the dialog layout refresh from the ctor to TransferDataToWindow which
is called by event after the dialog object is constructed.  This was causing
the 3D view panel to be drawn incorrectly on windows builds.

Remove unnecessary wxT() macros.

Fixes lp:1665888

https://bugs.launchpad.net/kicad/+bug/1665888
2017-04-04 10:05:01 -04:00
Chris Pavlina af88781262 Rewrite pcbnew preferences tooltips for consistency, fix a couple typos
Fixes: lp:1591428
* https://bugs.launchpad.net/kicad/+bug/1591428
2017-03-31 19:40:43 -04:00
Wayne Stambaugh b4e2757119 Make FP_TBL_MODEL reusable.
Factor out the FP_LIB_TABLE specific content from FP_TBL_MODEL into a new
LIB_TABLE_GRID class that can be used for any library table grid mix in.

Create new FP_LIB_TABLE_GRID object for the footprint library edit dialog.

Add method GetEnvVariables() to return any environment variables found in
a LIB_TABLE object.
2017-03-30 18:36:37 -04:00
Jon Evans 3ec28e2acf Refactor layer enumerations to all live in the same place 2017-03-30 16:01:48 -04:00
Chris Pavlina 4011ed4e31 Convert UTF8 to/from wxString correctly around LIB_ID
Fixes: lp:1675942
* https://bugs.launchpad.net/kicad/+bug/1675942
2017-03-24 21:38:00 -04:00
Alejandro García Montoro f68ce306bd CPolyLine -> SHAPE_POLY_SET refactor.
Removes the need of using the legacy code in polygon/PolyLine.{h,cpp},
refactoring all CPolyLine instances with SHAPE_POLY_SET instances.

The remaining legacy methods have been ported to SHAPE_POLY_SET;
mainly: Chamfer, Fillet, {,Un}Hatch.

The iteration over the polygon vertices have been simplified using the
family of ITERATOR classes.
2017-03-24 10:43:47 +01:00
John Beard b8edecc10f Move cursor shape flag into GAL settings
The motivation here is to concentrate display options in the GAL display
settings, ready for removal of legacy canvases. Instead of having the
property as a member of the DRAW_FRAME, with the GAL canvas retreiving
it from there, it is now in the GAL_DISPLAY_OPTIONS struct, and both GAL
and legacy get it from there.

The options for setting cursor shape are then moved out of the general
options dialog, and into the GAL display options widget, where they can
be used in all GAL-aware programs.

GAL cursor shape works on GAL, but not legacy, so the option is now
available on OSX (but only affects GAL, and is labelled as such).
2017-03-22 10:24:48 +01:00
John Beard b4a4748672 Move sketch mode area in pcbnew display options
This gives a bit more space to the GAL options in the left panel

Also tidy up some code style and unnecessary default arguments in the
GAL display planel widget.
2017-03-22 10:24:48 +01:00
jean-pierre charras 48f19c031a Fix a few issues when importing a .ses specctra session file.
(potential crash due to missing update of ratsnet data, add missing traces in GAL mode)
2017-03-21 11:22:03 +01:00
jean-pierre charras b365f17e9f First draft of courtyard overlap detection. 2017-03-19 20:27:44 +01:00
jean-pierre charras 98e3bfb95a rebuild dialog_edit_module_for_Modedit.cpp with a more recent wxFormbuilder version to avoid deprecated compil warnings 2017-03-18 10:37:19 +01:00
John Beard 7e1eea4122 Use abbreviated unit (not symbol) in design rule dialog
Fixes: lp:1667644
* https://bugs.launchpad.net/kicad/+bug/1667644
2017-03-16 08:30:00 -04:00
John Beard ef3553c086 Use TransferData* methods for DIALOG_DISPLAY_OPTIONS
Replaces the existing manual evdent handling, in line with UI
Guidelines.

Also remove the wxStaticLine, which is not a standard dialog element.
2017-03-16 08:01:42 -04:00
John Beard bdc9ae75f5 Add a display settings dialog to Modedit
For a start, this contains the GAL display settings (AA settings and
grid styling).

In future, other modedit-specific settings could go here too.

Fixes: lp:1672150
* https://bugs.launchpad.net/kicad/+bug/1672150
2017-03-16 08:01:33 -04:00
John Beard f2aa4d2911 Make GAL options panel a reusable panel
The primary motivation here is to allow other GAL canvas users (eg
Modedit, and soon Gerbview) to be able to easily modify GAL canvas
options.

For now, this doesn't change the display properties dialog in
appearance, but if more GAL options are added, it might need a bit of
tweak and maybe tabs or similar, like Eeschema preferences.
2017-03-16 08:01:26 -04:00
jean-pierre charras 69b350c9b0 Fix can't always group delete in fp-lib-table dialog
Fixes: lp:1672760
https://bugs.launchpad.net/kicad/+bug/1672760
2017-03-14 20:31:44 +01:00
Julius Schmidt 5b3f6d850d Fix format string assertion in select net dialog. 2017-03-13 16:45:41 -04:00
Maciej Suminski fe4f02f5b9 Coverity fixes
CIDs:
- 153097
- 157120
- 157119
- 155148
- 155146
- 153103
- 153099
- 153095
- 153087
- 153086
2017-03-11 22:20:08 +01:00
Jon Evans 88f7c55d95 Move ZoomFitScreen and ZoomPreset from PCBNEW_CONTROL to COMMON_TOOLS
BOARD::GetBoundingBox() now directly calls BOARD::ComputeBoundingBox()
and there is a new method BOARD::GetBoardEdgesBoundingBox() used for
call sites that needed to use ComputeBoundingBox( true ) in the past.

This allows COMMON_TOOLS to implement ZoomFitScreen without knowledge
of the BOARD class.
2017-03-03 13:28:19 +01:00
jean-pierre charras 1cffcafe2d GAL mode: Add small cross option to grid style (now: options are Dots, Grid, Small cross) 2017-03-01 10:29:19 +01:00
Jon Evans fd4e2b042c Refactor SELECTION, SELECTION_CONDITIONS, and context menus to common
SELECTION now holds EDA_ITEMs not BOARD_ITEMs so various places had to
change to casting the selected items to BOARD_ITEMs.

Fixed compilation warnings on clang (Tom)
2017-02-28 14:47:20 +01:00
jean-pierre charras 6b431b4791 Fix transaltion issue.
Rebuild dialog_display_options_base with a recent wxFormbuilder version.
2017-02-26 13:03:38 +01:00
John Beard c6046d6da2 Add selection filter dialog to GAL
Fixes: lp:1535805
* https://bugs.launchpad.net/kicad/+bug/1535805
2017-02-23 10:50:38 +01:00
John Beard 6ba9a512b6 Factor DIALOG_BLOCK_OPTIONS into separate compilation unit
This means the dialog can be accessed from both GAL and legacy modes.

This also removes the use of static bools for passing the selection
states and instead used a struct of values passed in by the calling
code.
2017-02-23 10:50:38 +01: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