Commit Graph

3447 Commits

Author SHA1 Message Date
jean-pierre charras 3e38b3dca3 Very minor fix in message to avoid a too long sentence 2017-12-02 09:52:02 +01:00
Wayne Stambaugh a0c922e493 Fix broken contributor names with non-ASCII characters in about dialog. 2017-11-30 09:57:24 -05:00
Wayne Stambaugh a74bad1630 About dialog fixes.
Remove developer email addresses as requested on the developers mailing
list.

Update source contributor list.

Add place holders for symbol and footprint library contributors.

Remove unnecessary wxT() macros.
2017-11-29 18:06:01 -05:00
jean-pierre charras 68268973b7 To avoid mistakes between graphic layers for pads, holes and not plated holes, rename 3 GAL_LAYER_ID names:
LAYER_NON_PLATED to LAYER_NON_PLATEDHOLES
LAYER_PADS_HOLES to LAYER_PADS_PLATEDHOLES
LAYER_PADS to LAYER_PADS_TH
and add comments and fix a render issue in gal mode for non plated holes.
2017-11-29 09:48:41 +01:00
Wayne Stambaugh 157db6351c Minor HTML message panel improvements.
Change action message color from "darkgreen" to "dark green" as the
former does not exist on windows and results in debug log warnings.

Change the information color from "grey" to "dark grey" for improved
contrast with the white backgrounds.  This may need to configurable
on systems where the HTML window has a dark background color.

Don't translate HTML formatting strings.
2017-11-28 13:14:11 -05:00
Maciej Suminski 6bd700c5dc Larger font for the ruler tool
Fixes: lp:1672040
* https://bugs.launchpad.net/kicad/+bug/1672040
2017-11-28 14:45:52 +01:00
Jon Evans 84ab71f8ec Allow changing LAYER_PADS color and visibility (Fixes lp:1672646) 2017-11-28 11:02:39 +01:00
Jon Evans 0564d3456b Preserve color scheme when switching to legacy (Fixes lp:1670669)
Instead of modifying the colors when switching to legacy canvas,
they will now be preserved and only returned as the "legacy" colors.
2017-11-28 10:47:04 +01:00
Jon Evans 9e6956c9ac Reset tool transitions even when already active (Fixes lp:1733224) 2017-11-28 09:24:29 +01:00
Chris Pavlina f576596375 Add "unlock" property to footprint texts
This property decouples the text orientation from the board orientation,
removing the restriction that it face the bottom or right side of the
board.
2017-11-27 18:21:00 -07:00
Oliver 8a32243b89 Slight tweaks to About dialog
- Small wording improvements
- Hyperlinks now show URL
- Remove links to outdated library sources
2017-11-27 18:20:59 -05:00
Maciej Suminski 1f70cc8c5f Expression evaluator: increased output precision 2017-11-24 21:16:13 +01:00
Maciej Suminski 9866196130 Expression evaluator: handle locale setting for decimal separator
NumericEvaluator uses the locale settings to determine the decimal
separator character which will be used when parsing expressions.
2017-11-24 21:16:13 +01:00
Maciej Suminski 1c4056e17a TEXT_CTRL_EVAL: wxTextCtrl wrapper supporting math expression evaluation 2017-11-24 21:15:40 +01:00
Michael Geselbracht b5fc6e45cf Numeric expression evaluator 2017-11-24 21:15:40 +01:00
Maciej Suminski 579d3f478d Renamed WX_UNIT_BINDER to UNIT_BINDER and moved to common/widgets
WX_ prefix should reserved for classes provieded by wxWidgets.
2017-11-24 21:15:40 +01:00
Julius Schmidt 9df938484a support "disable autopan" with gal canvas
Fixes: lp:1670712
* https://bugs.launchpad.net/kicad/+bug/1670712
2017-11-24 12:20:15 +01:00
Wayne Stambaugh b82bd8e0c5 Fix symbol names with illegal library ID characters.
Change the legacy schematic plugin to preserve illegal LIB_ID characters
when load schematics prior to version 4.

Check for illegal LIB_ID symbol names during project rescue.  Rename and
rescue any symbols with illegal LIB_ID names.

Add static methods to LIB_ID object for testing for and fixing names
with illegal characters so there is uniform code for doing so.

Update the Eagle plugin symbol loader to fix symbol names using the new
LIB_ID fix illegal names method.

Fixes lp:1732236

https://bugs.launchpad.net/kicad/+bug/1732236
2017-11-23 10:52:55 -05:00
Wayne Stambaugh 78366f8f0b Revert commit bc0306ba as it did not fix the issue. 2017-11-22 15:54:18 -05:00
Wayne Stambaugh bc0306ba99 Fix a possible bug in path normalization code.
The NormalizePath() function always added a trailing separator when
normalizing environment variables.  Now it checks an environment
variable for a trailing separator and only adds one if it doesn't
already exist.

May be a partial fix for:

Fixes lp:1733217

https://bugs.launchpad.net/kicad/+bug/1733217
2017-11-21 19:05:23 -05:00
Maciej Suminski d16e4e23d7 DIALOG_MULTI_OPTIONS: fixed disappearing buttons 2017-11-21 23:18:55 +01:00
Maciej Suminski 28608b1b52 Changed DIALOG_MULTIPLE_OPTIONS to use wxCheckListBox class 2017-11-21 23:18:55 +01:00
Maciej Suminski 98c99ff129 DIALOG_SHIM: do not raise invisible windows on wxMSW
Raise() invokes SetFocus() on Windows OS, leading to an API error
(check wxWindowMSW::SetFocus() in wxWidgets/src/msw/window.cpp as
of wxWidgets 3.0.2). In certain cases it leads to a crash.
2017-11-21 23:18:55 +01:00
Maciej Suminski 07c104af63 confirm: fixed signed vs unsigned comparison warnings 2017-11-21 23:18:55 +01:00
Maciej Suminski 19a85a36a3 confirm: Added Select{Single,Multi}Option() to display generic selection dialogs 2017-11-21 23:18:55 +01:00
Oliver 8b140186fe Only enumerate active libraries 2017-11-21 08:18:35 -05:00
Oliver f48e868a79 Load "disabled" for footprint libraries 2017-11-21 08:18:26 -05:00
Oliver f85ce87e44 Toggle LIB_TABLE_ROW enabled/disabled in grid editor
- Checkbox editor for enabled / disabled status
2017-11-21 08:18:17 -05:00
Oliver 7cdb78e852 Added "enabled" parameter for LIB_TABLE_ROW
- Read and write from lib-table working
2017-11-21 08:18:06 -05:00
Maciej Suminski 33cf082c41 Fixed library path resolution in Spice netlist exporter
SEARCH_STACK is a deprecated method for getting the list of paths where
one could look for a file. Instead it tries the project path and
environmental variables.
2017-11-19 11:38:57 +01:00
Maciej Suminski 759359f602 Moved path normalization functions to a separate file
Normalizing paths to environmental variables might be useful in
many places, therefore it is better to keep them accessible.
2017-11-18 20:05:08 +01: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
jean-pierre charras 2ec3a46984 Add support of DRAWSEGMENT S_POLYGON shape to plot functions.
Fixes: lp:1732570
https://bugs.launchpad.net/kicad/+bug/1732570
2017-11-16 12:09:24 +01:00
Tomasz Włostowski 41f9c19b7d pcbnew: editing outlines now works in flipped view mode
Fixes: lp:1731978
* https://bugs.launchpad.net/kicad/+bug/1731978
2017-11-16 01:05:43 +01:00
Tomasz Włostowski b76a6210c5 pcbnew: fixed stuck cursor when ForceCursorPosition() is active and cursor is moved by keyboard arrows
Fixes: lp:1729301
* https://bugs.launchpad.net/kicad/+bug/1729301
2017-11-16 00:43:23 +01:00
Tomasz Włostowski 00ad8f24a0 pcbnew: Minor changes in CONNECTIVITY_DATA interface:
- renamed connectivity.[h|cpp] to connectivity_data [.h|.cpp] so that the file name matches the main class name.
- GetNetItems() now returns a vector instead of a list
2017-11-15 18:34:08 +01:00
Seth Hillbrand 13ef1a911f Eeschema: Adding dashed line support to DXF plot
NEW: Dashed, dotted and dash-dot line support to DXF plot
in eeschema.
2017-11-15 08:10:51 +01:00
Seth Hillbrand 7c0a7f9f7b Adds plot functionality to Eeschema line formats
Dotted, dashed and dash-dot lines are provided in
HPGL, PDF, PS and SVG plot outputs along with line
width and color formatting.

DXF format does not currently provide any dashed
line functionality

A bug in HPGL plotted is corrected.  Previous HPGL
dashed line commands were incorrect, plotting all
lines as solid.
2017-11-15 08:10:51 +01:00
Seth Hillbrand b576189a00 Eeschema: Adding line styling options
NEW: Adds support in eeschema for changing the default line style,
width and color on a case-by-case basis.

CHANGED: "Wire" lines now optionally include data on the line style,
width and color if they differ from the default.

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

Fixes: lp:1405026
* https://bugs.launchpad.net/kicad/+bug/1405026
2017-11-15 08:10:51 +01:00
jean-pierre charras 2337b83ba6 richio.h, class LINE_READER: prefix variable member names by "m_", like in other classes in Kicad. 2017-11-12 18:29:56 +01:00
Baranovskiy Konstantin a4b962e7d9 Fix wildcard for Eagle XML files. 2017-11-12 07:40:24 -05:00
Wayne Stambaugh 652b969193 GTK+ file dialog wildcard improvements.
The GTK+ file dialog is case sensitive however it does support regular
expressions.  Most of the file dialog wildcards are lower case so only
files with the lower case extensions will show up in the file dialog.
This code adds a method to convert file extensions of any case to the
appropriate (sch -> [sS][cC][hH]) regular expression on GTK+ builds so
all file extension case combinations will show up in the file dialog.

A note to developers: make sure to add a file extension when setting
when setting the default file argument.  If you do don't set an
extension, the GTK+ file dialog will happily append the regular
expression as the file extension which is surely not what you want.

There are still a few known places (mostly gerbview) where there are
some complex wildcard code that has not been converted.

Fixes lp:1720542

https://bugs.launchpad.net/kicad/+bug/1720542
2017-11-11 19:32:26 -05:00
Wayne Stambaugh 5181c0ac75 Minor symbol library table edit dialog fix.
A copy and paste error was causing to footprint library table file name
and path to be shown in the symbol library table edit dialog.  Factor
out code in PROJECT::FootprintLibTblName() to PROJECT::libTableName()
to handle both symbol and footprint library table names and create a
new PROJECT::SymbolLibTableName() method to fix the path and file name
in the symbol library table edit dialog.
2017-11-11 10:33:06 -05:00
jean-pierre charras 9723b0d844 Fix a few minor coverity warnings (not initialized members) 2017-11-11 07:25:00 +01:00
Wayne Stambaugh 36f6d4a1f4 Convert symbol library editor over to use symbol library table.
Simplify some of the library editing code.  There have been a few minor
changes in the behavior of the editor.  If the current symbol is deleted
from the library, the next symbol in the library is not loaded.  The
deleted symbol is cleared and the current symbol is empty.

Change component to symbol to align with the preferred terminology
discussed on the developer's mailing list.

Add separate update UI event for save library as to enable the menu entry
whenever a library is selected.

Change the select symbol list dialog to a single column using the LIB_ID
format LIB_NICKNAME:LIB_ITEM_NAME so that the selection can be parsed by
LIB_ID.

Add method to expand URI to LIB_TABLE_BASE.

Override wxApp::OnExceptionInMainLoop() in debug builds to make debugging
easier when an unhandled exception occurs in a wxUpdateUIEvent handler.

Change SCH_SCREENS::HasNoFullyDefinedLibIds() to return false when the
schematic has no symbols to prevent the remapping dialog from being run.

Use SCH_COMPONENT part reference when creating netlist rather than looking
up the library symbol.
2017-11-09 18:50:20 -05:00
Wayne Stambaugh 81e8d8fd89 Symbol library table remapping fixes.
Use GetPath() instead of GetFullPath() when initializing environment
variable table entries KICAD_SYMBOL_DIR and KICAD_PTEMPALTE due to
unexpected trailing path separator which was causing find libraries
by URI to fail.

Don't create a project symbol library table when there are no libraries
not found in the global symbol library table.

Don't add non-existent libraries to project symbol library table.

Clear symbol library table when loading a new schematic.

Minor remapping status message improvements.
2017-11-09 18:50:18 -05:00
Wayne Stambaugh 0cf2df51c6 Convert symbol library viewer over to symbol library table.
Remove all instances of PART_LIBS and replace them with SYMBOL_LIB_TABLE
except for the CMP_TREE_MODEL_ADAPTER which requires updating as well.

Return the selected symbol using the LIB_NICKNAME:SYMBOL_NAME format when
viewer is launched as modal.

Add code to SYMBOL_LIB_TABLE object to allow enumerating symbol library
power symbols only.

Add a non-const version of LIB_TABLE::findRow().

Remove redundant information from Doxygen comments.
2017-11-09 18:50:17 -05:00
Wayne Stambaugh 96c3d5ff21 Enable symbol library table remapping.
Check the if the schematic being loaded has been remapped (no symbol
library table nicknames defined) and remap accordingly.

Fix issues when resolving the library symbol links in the schematic
symbols.

Add cache library fallback when resolving symbols that cannot be
remapped.

Add remap complete message to remap dialog.

Add HasLibrary() helper to LIB_TABLE_BASE.

Fix issues when loading library symbols using symbol library table.

Add hashing function to symbol library table.

Improve the symbol panel message to warn user when cache library is
used to resolve symbol.
2017-11-09 18:50:17 -05:00
Marvin Schmidt 273437641c Remove some else-after-return's 2017-11-09 19:52:18 +01:00
Marvin Schmidt c36d666dde Remove duplicate #include 2017-11-09 19:52:18 +01:00
Marvin Schmidt 69974b73db Remove some extra semicolons 2017-11-09 19:52:18 +01:00
Marvin Schmidt 20f3cdaaea Remove orphaned code files 2017-11-09 19:52:18 +01:00
jean-pierre charras e985fc18e0 Fix a corner case in richio.cpp that creates a memory allocation overrun (allocate more space).
Also allows more space in memory allocation to read strings.

Could fix this bug:
Fixes: lp:1730861
https://bugs.launchpad.net/kicad/+bug/1730861
2017-11-08 13:11:51 +01:00
Maciej Suminski 40129d2244 Fixed cursor freeze after canceling a tool with cursor over a drag point
Fixes: lp:1716702
* https://bugs.launchpad.net/kicad/+bug/1716702
2017-11-08 11:41:45 +01:00
jean-pierre charras 7d24a576e4 Avoid drawing into a non valid gl context when closing the DIALOG_PAD_PROPERTIES dialog
Fixes: lp:1729843
https://bugs.launchpad.net/kicad/+bug/
2017-11-07 18:33:53 +01:00
jean-pierre charras 81ad3366f5 Avoid division by 0 in GAL::GetGridPoint( const VECTOR2D& aPoint ) 2017-11-07 09:45:03 +01:00
Maciej Suminski f5c561e281 Fix build error due to missing optional::value_or() 2017-11-04 11:29:55 +01:00
Tomasz Włostowski 9932ff32ae refactoring: wrapped boost::optional in OPT<> class for the purpose of easier transition to C++17 in the future 2017-11-03 23:59:02 +01: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 c9817df9db refactoring: implemented BOARD-specific view Add()/Remove()/Update() methods in PCB_VIEW, moved to libpcbcommon 2017-11-03 20:02:06 +01:00
Tomasz Włostowski 781008bfa5 refactoring: allow to run TOOL_MANAGER and SELECTION_TOOL without a host wxFrame 2017-11-03 20:02:06 +01:00
Tomasz Włostowski 06f3b35255 refactoring: moved BOARD_COMMIT, PCB_GENERAL_SETTINGS and TransformShapeWithClearanceToPolygon() to libpcbcommon 2017-11-03 20:02:06 +01:00
Tomasz Włostowski 8a09a1d329 refactoring: derive PCB-specific PCB_VIEW from VIEW with the intention of moving PCB_EDIT_FRAME entries used by the tools (e.g. GetActiveLayer) there 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
Maciej Suminski 5eb56dd8b0 Coverity fixes
CIDs:
102571
168696
168701
168704
168706
168708
168710
168713
168716
168717
2017-11-01 10:24:26 +01:00
jean-pierre charras 6300041ce4 Fix a focus issue in GAL canvas:
Sometimes there is no window that has the focus (it happens when an other PCB_BASE_FRAME is opened and is iconized on Windows).
2017-10-30 15:12:41 +01:00
Maciej Suminski 4bf8bb79ce Removed a redundant comparison 2017-10-29 00:54:08 +02:00
jean-pierre charras 3ed106fb70 Make a translation more easy
Better title in dialog netlist option (Unconnected Tracks ->Tracks Connecting 2 Nets)
The previous title (Unconnected Tracks) is incorrect.
2017-10-28 15:27:45 +02:00
jean-pierre charras fc5e8e5f52 ENV_VAR config dialog enhancements.
From an initial work of Oliver <oliver.henry.walters@gmail.com>
2017-10-26 11:47:57 +02:00
jean-pierre charras d2d1237506 minor enhancement in code 2017-10-26 10:55:01 +02:00
Simon Richter 48ed0dcda2 code enhancement (remove duplicate) 2017-10-26 10:19:15 +02:00
jean-pierre charras 78ec983632 DRAWSEGMENT fix crash when trying to copy a empty polygon.
SHAPE_POLY_SET: fix crash in VertexCount when it is a empty poly set, or when params are incorrect.

minor other fixes:
warning in degug mode in dialog_dxf_import_base.cpp
pcb_painter.cpp: remove a useless debug line.
2017-10-25 09:39:26 +02:00
Maciej Suminski 944c5481fe Hash functions for BOARD_ITEMs 2017-10-24 23:10:40 +02:00
jean-pierre charras 788972554b minor fix 2017-10-23 19:11:32 +02:00
jean-pierre charras eb2340bc23 Show/Hide icons in menus (according to Icons option) in GAL, like in Legacy mode.
Cosmetic enhancement in Gerbview context menu.
2017-10-23 18:48:03 +02:00
jean-pierre charras 3407c6cf27 Gerbview: add icons in a context menu.
gal: remove a forgotten debug line.
2017-10-23 16:53:42 +02:00
jean-pierre charras 2d6496c7f6 Replace UNIT by EAGLE_UNIT in Eagle plugin to avoid having a lot of useless hits when grep for "UNIT" 2017-10-23 15:37:24 +02:00
jean-pierre charras 7418deb454 Pcbnew: fix issues with 360 deg angle arcs.
Fixes: lp:1725943
https://bugs.launchpad.net/kicad/+bug/1725943
2017-10-23 15:35:03 +02:00
Maciej Suminski 0ed7483868 Eeschema Eagle Import: support UTF-8 for fields 2017-10-20 09:34:33 +02:00
Maciej Suminski e466bf50ae Eagle PCB import plugin: fix dimensions import 2017-10-20 09:34:33 +02:00
Maciej Suminski ee8012a5cc Eagle import plugin: Code clean-up and formatting 2017-10-20 09:34:33 +02:00
Maciej Suminski 25b8111341 Modified Eagle import plugins to use nanometers as the internal unit 2017-10-20 09:34:33 +02:00
Maciej Suminski 6b44d12bd8 Revert modifications to SCH_EDIT_FRAME::OpenProjectFiles() 2017-10-20 09:34:32 +02:00
Maciej Suminski ce11e9a264 Eeschema Eagle Import: Changed convertTextSize() to ETEXT::ConvertSize() 2017-10-20 09:34:32 +02:00
Russell Oliver 2a0a999350 Eeschema Eagle Import: Code clean-up and formatting 2017-10-20 09:34:32 +02:00
Maciej Suminski 985aed36c7 Moved FMT_UI & FMT_ANGLE macros to a separate header 2017-10-20 09:34:32 +02:00
Russell Oliver 3b0855d204 Eagle Project Import: Code cleanup and documentation.
- Also makes the project and file import functions filetype dependent.
- The change from IO_MGR::KICAD to IO_MGR::KICAD_SEXP removes a conflict from a compile definition for KICAD when compiling kicad/import_project.cpp
2017-10-20 08:58:40 +02:00
Russell Oliver 230e8978f5 Eagle Parser: Fix overwritten changes 2017-10-20 08:58:40 +02:00
Russell Oliver 869743d573 Kicad Eagle Project Import Improvements. -- schematic and board files are both visible in file selection dialog. -- Allows for the selection of either the board or schematic file. -- silently fails on not detecting the corrosponding board or schematic file. -- all new kicad files are generated in new project directory -- Silently read netlist without generating annotation warnings which synchronises timestamps and paths based on given eagle references, otherwise renumbering schematic references will break links accross schematic and pcbnew. 2017-10-20 08:58:40 +02:00
Russell Oliver 3145829b77 Fix compiler redefined warnings for FMT_IU 2017-10-20 08:58:40 +02:00
Russell Oliver a8fa64f158 Eeschema Eagle Import: Shift convertTextSize to common eagle parser. 2017-10-20 08:38:42 +02:00
Russell Oliver 433aa653fe Kicad: Add Project import function. -- add menu entry -- add ImportFile kiway function -- expose functions for creating/reading netlist -- add example eagle boad file as well 2017-10-20 08:38:42 +02:00
Maciej Suminski 08907d4fe8 Eeschema Eagle Import: generate unique timestamps for multiunit parts 2017-10-20 08:38:42 +02:00
Maciej Suminski 2adc3d48b4 Eeschema Eagle Import: Assign timestamps for modules 2017-10-20 08:38:39 +02:00
Maciej Suminski f5e7c2ee48 Eeschema Eagle Import: Check if alignment is defined before parsing 2017-10-20 08:38:39 +02:00
Russell Oliver bb754b33d0 Eeschema Eagle Import: Parse instance attributes for value and refererence positions and alignment. 2017-10-20 08:38:38 +02:00
Russell Oliver c274a21548 WIP: Symbols are imported and displayed, and save to cache file on schematic save. 2017-10-20 08:38:38 +02:00
Russell Oliver b9edfe4fe4 WIP: Refactor symbol importation to account for multiple gates and device connect pin maps. 2017-10-20 08:38:38 +02:00
Russell Oliver 82cc0c7e2e Common: Eagle parser add EPART, EINSTANCE, EGATE, ECONNECT, EDEVICE 2017-10-20 08:38:38 +02:00
Russell Oliver 96317fb7c3 Common: Reorder some functions in eagle_parser.* 2017-10-20 08:38:38 +02:00
Maciej Suminski e03bc32e49 Eagle plugin: Code formatting 2017-10-20 08:38:38 +02:00
Maciej Suminski f049b01a59 Eagle plugin: Added 'static' and 'const T&' as applicable 2017-10-20 08:38:38 +02:00
Russell Oliver ea8f7ed02d Eeschema: Eagle plugin> work on schematic and symbol elements 2017-10-20 08:38:37 +02:00
Maciej Suminski c727423979 Work in progress
- !! Eeschema uses Eagle plugin for loading schematics (i.e. it does not
use KiCad format anymore)
- Fixed build errors
- Fixed a few crashes
- Code formatting
2017-10-20 08:38:37 +02:00
Maciej Suminski f5b2a2ea57 Code formatting and cleanup 2017-10-20 08:38:37 +02:00
Tomasz Włostowski bcde2a77e2 common/single_top: allow to launch footprint editor from the command line (--frame switch) 2017-10-19 23:15:48 +02:00
Tomasz Włostowski dc7b743782 common: VECTOR2I-based RotatePoint() 2017-10-19 23:15:13 +02:00
Tomasz Włostowski d2c9a5d81a geometry: Area() method in SHAPE_LINE_CHAIN 2017-10-19 23:14:36 +02:00
jean-pierre charras b5f23befeb Fix incorrect initialization of default colors for some items.
Fix incorrect detection of key handled in footprint_wizard_frame.cpp
2017-10-09 10:35:53 +02:00
jean-pierre charras 246f8cae24 Fix missing initialization of colors settings of a board, when created by a python script.
A pointer was not initialized, therefore plots from a python script sometimes crash.

Fixes: lp:1721166
https://bugs.launchpad.net/kicad/+bug/1721166
2017-10-08 16:21:27 +02:00
jean-pierre charras 4905bbe500 hotkey management: enhancements in code to know if a hotkey was handled by an event or not.
No actual change in key management: in legacy it was partially existing, and not yet used in GAL mode.
2017-10-06 09:23:13 +02:00
jean-pierre charras 1164eaab72 Make the "No Net" mark color editable (mark for pads having no net name)
Note: this mark is currently drawn only in legacy canvas.
2017-10-05 20:11:55 +02:00
jean-pierre charras acccb10ca5 Minor fix: Fix a incorrect min size of COLOR4D_PICKER_DLG on Linux+KDE 2017-10-04 16:35:57 +02:00
jean-pierre charras 4b010ca129 Fix useless trailing and leading spaces in a few messages. Fix also capitalization in a few menus. 2017-10-02 09:25:48 +02:00
Kristoffer Ödmark c0981b8444 Added a new plugin that can save and load to clipboard, using ctrl+shift+c/v for copy pasting
Added the needed kicad_clipboard files and made copy pasted modules have no path
2017-09-30 14:28:53 +02:00
Maciej Suminski 4bd51b7049 Fixed EDA_BASE_FRAME::removePaneBorder() for classes not using AUI
Fixes: lp:1720386
* https://bugs.launchpad.net/kicad/+bug/1720386

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

Fixes: lp:1720389
* https://bugs.launchpad.net/kicad/+bug/1720389
2017-09-29 17:08:32 +02:00
jean-pierre charras 5aeb6129ca Fix a bug in KIGFX::COLOR4D ctor: . The alpha channel (opacity) was set to 0. this is a mistake. It is now set to 1.0
Fixes lp:1718389
2017-09-29 14:52:51 +02: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
Maciej Suminski 068a29952c Changed AUI toolbars background from gradient to solid
Based on patches from Windsor Schmidt <windsor.schmidt@gmail.com>
2017-09-27 23:23:06 +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 363fc598c0 Fixed bug in FlipLayerMask
- Offset for internal copper layers was incorrect
- Incorrect mask was used
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
Kevin Zheng 6487ec5c21 Reword hotkey reset menu items
Fixes lp:1717637
2017-09-26 09:21:48 -04:00
Jon Evans 9383987b1c Skip calling RTREE::Remove() when adding items to a VIEW 2017-09-25 13:39:38 +02:00
Maciej Suminski 05a120f09f Unified {Load,Save]CanvasTypeSetting in EDA_DRAW_FRAME 2017-09-25 13:39:32 +02:00
Jon Evans 77bf22359e Move zoom_tool.h to include 2017-09-25 13:35:01 +02:00
Jon Evans 0b9b8d3e93 Add support for reversed draw order and Cairo negative draw mode 2017-09-25 13:35:01 +02:00
Maciej Suminski df472e6426 Added mouse position refresh event WX_VIEW_CONTROLS::WarpCursor() 2017-09-22 11:13:45 +02:00
Michael Geselbracht da037027fb Do not warp viewport when dragging FPs
Fixes: lp:1714611
* https://bugs.launchpad.net/kicad/+bug/1714611
2017-09-22 11:13:40 +02:00
Wayne Stambaugh 427e5ec461 Eeschema: fix crash when undo called during item edit.
Add EDA_DRAW_FRAME::isBusy() method to test if the current item is being
edited or a block operation is in progress.

Ignore undo and redo commands when editor is busy.

Fixes lp:1718656

https://bugs.launchpad.net/kicad/+bug/1718656
2017-09-21 12:37:52 -04:00
Wayne Stambaugh cb764d73c5 Minor trace logging improvements.
Make all trace environment variable strings upper case and prefix with
KICAD_TRACE_ for consistency.

Add Doxygen group for the trace environment variable strings.
2017-09-21 08:58:41 -04:00
jean-pierre charras b18601dfc6 Send wxEVENT_CHAR to GUI (if the key is not a special key that scrolls the draw panel) both on Linux and Windows
fix lp:1718488
2017-09-20 20:21:54 +02:00
jean-pierre charras 4e8ad8516a Update gerber job file format and job file extension.
Gerber job file extension is now .gbrjob, according to latest changes in Gerber job file spec.
2017-09-20 18:14:20 +02:00
jean-pierre charras d8ade988ce workaround for a minor and strange issue: size of chars '-' and '_' are incorrect in msdf_atlasgen fonte. the size of 'x' char is used instead. 2017-09-19 18:56:33 +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
jean-pierre charras 48393c605e Try to fix special keys (ARROWS, PAGE UP/DOWN) issues both on Linux and Windows in GAL mode
Fixes: lp:1717270
https://bugs.launchpad.net/kicad/+bug/1717270
2017-09-18 16:04:31 +02:00
jean-pierre charras e2505cb2fd better fix than commit c0bc2f1 that tried to fix an overzealous event propagation:
The fix is now only for Windows, because it creates issues and does not fix the special keys issues on Linux.
This is due to the serious differences in event management between platforms.
2017-09-15 16:29:26 +02:00
Jon Evans d9396616ef Add support for panning with left and right mouse buttons 2017-09-15 13:35:52 +02:00
jean-pierre charras c0bc2f1bee Try to fix an overzealous event propagation that creates some key events (arrows, page up page down and some others) and mouse events called twice.
the first call is the right call, the last call being the default handler.
2017-09-15 11:29:50 +02:00
jean-pierre charras cf178fd20a add a wxASSERT just in case. 2017-09-15 11:29:49 +02:00
Jon Evans 93de82f0b2 Fix scrollbars in macOS GAL canvases 2017-09-15 11:29:49 +02:00
Jon Evans 5364cd9681 Improved zoom behavior on MacOS 2017-09-15 11:27:35 +02:00
Jon Evans 49a3e7ec2d Support scrollbar controls in GAL canvas 2017-09-14 07:34:29 +02:00
Wayne Stambaugh 33cc7b3f99 Fix broken default icons in menus setting for OSX. 2017-09-13 12:59:42 -04:00
Jon Evans 8182369c64 Make RULER_ITEM generic and ensure text mirroring is disabled 2017-09-12 12:49:43 +02:00
Jon Evans b6298a0a41 Don't force grid color to LAYER_GRID in EDA_DRAW_PANEL_GAL 2017-09-12 12:49:17 +02:00
jean-pierre charras e15acbb00d Fp editor and board editor have now a separate color setup.
fp viewer uses the default colors, because it has no color setup dialog.
class_colors_design_settings: remove not used members.
Fix issue in modedit: the color config was never read.
2017-09-11 18:51:48 +02:00
Maciej Suminski 8c7175b00d Upload correct amount of vertex data in CACHED_CONTAINER_RAM
Previous implementation uploaded only vertices with indices less
or equal to the number of stored vertices, which is invalid when
the container become fragmented.

Fixes: lp:1712887
* https://bugs.launchpad.net/kicad/+bug/1712887
2017-09-09 21:07:32 +02:00
Maciej Suminski 342bb2bf78 Code formatting
Renamed VERTEX related constants to follow UPPER_CASE naming.
2017-09-09 21:07:32 +02:00
jean-pierre charras 8c70681b31 Remove useless includes and more fixes to avoid including curl.h in files, when not mandatory. 2017-09-05 08:07:31 +02:00
jean-pierre charras 6ea6c7219a Avoid including curl.h in dialog about (including curl.h creates constraints with wxWidgets especially on Windows)
and remove duplicate code.
2017-09-04 12:53:50 +02:00
Wayne Stambaugh d190aa423f Minor version information improvements.
Include GTK+ version when appropriate so developers don't have to try to
figure out which version of GTK+ wxWidgets was built against.

Add KICAD_SPICE option status.
2017-09-01 08:19:17 -04:00
Jon Evans eec1366ead Move ZOOM_TOOL to common; add RMB-drag to zoom out 2017-08-31 10:04:00 +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
Tomasz Włostowski 2e4c22f718 router: fix corruption of board data when the inline drag is activated while the router tool is running
Fixes: lp:1712838
* https://bugs.launchpad.net/kicad/+bug/1712838
2017-08-30 01:16:06 +02:00
Michael Kavanagh 82ce90ecdc PL Editor UI Improvements: Menubar, toolbar and hotkeys 2017-08-29 11:52:34 -04:00
jean-pierre charras 758445e33e Fix a compil warning and a wxASSERT in COLOR4D_PICKER_DLG_BASE 2017-08-28 17:40:26 +02:00
jean-pierre charras e3c64f1f06 Slightly modify keywords used to store color config of Eeschema and Pcbnew, to avoid this config destroyed each time a stable version is run. 2017-08-27 09:06:26 +02:00
Mathias Grimmberger ffeba9de93 Change track width setting to dropbox 2017-08-25 16:46:49 +02:00
Maciej Suminski 31ef52a365 Fix fine-grid cursor movement using arrow keys
Fixes: lp:1497976
* https://bugs.launchpad.net/kicad/+bug/1497976
2017-08-22 15:14:33 +02:00
Maciej Suminski d4fddf1929 Fix eeschema crash when saving LIB_BEZIER objects 2017-08-22 13:29:53 +02:00
Maciej Suminski b5db6a7d5d Map/unmap vertices once per layer order update
Multiple memory map/unmap operations cause a significant delay on
GPUs that fetch vertices from RAM.

Fixes: lp:1701936
* https://bugs.launchpad.net/kicad/+bug/1701936
2017-08-21 13:28:09 +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
jean-pierre charras 28c04cbbf5 Fix filename in a include 2017-08-18 16:56:49 +02:00
jean-pierre charras 4c9d0b9c0a Refactor About dialog:
Code refactor
Fix coding style issues
Add a button to display the build version info, and add a tooltip to the copy button.
2017-08-18 16:16:48 +02:00
Maciej Suminski 6ff065fa63 Fixed recognition of GPUs not handling glMapBuffer() efficiently
Fixes: lp:1685335
* https://bugs.launchpad.net/kicad/+bug/1685335

Fixes: lp:1683041
* https://bugs.launchpad.net/kicad/+bug/1683041
2017-08-18 15:02:46 +02:00
jean-pierre charras 0999b5cb77 Make texts search-able in PDF files (using invisible texts behind stroked texts) 2017-08-15 15:53:00 +02:00
Wayne Stambaugh f781691049 Eeschema: add symbol library table editor dialog.
Create a new dialog to edit global and project specific symbol library
tables.

Add menu entries for new symbol library table editor in schematic editor
and symbol library editor main frame menus.

Add command event handler for symbol library table editor dialog to
SCH_BASE_FRAME so it is accessible from derived frames.

Fix bug in default environment variables initialization.  A test for
existing user defined environment variables was preventing any new
default environment variables added to the list from being initialized.
2017-08-12 08:10:34 -04:00
jean-pierre charras 84f1c8e0c6 color4Dpickerdlg.cpp: avoid selecting accidentally a new color when the mouse cursor is inside a color map when opening the dialog 2017-08-12 07:52:15 +02:00
jean-pierre charras 8a1a3ed36c Better fix for compil problems in utils.cpp 2017-08-09 15:30:01 +02:00
jean-pierre charras 7ab6368869 Fix compil problems in utils.cpp, to be compatible with msys2/windows and linux. 2017-08-09 14:05:10 +02:00
Maciej Suminski c18d148589 Moved VERTEX_CONTAINERs intialization to the constructors 2017-08-08 15:33:57 +02:00
Maciej Suminski 4ae29aa693 Fixed a shadowing variable warning 2017-08-08 15:31:45 +02:00
Maciej Suminski 2697a21a7a Yet another try for correct function signature type cast 2017-08-08 15:26:50 +02:00
Maciej Suminski ef6910faa9 Take two for satisyfing picky compilers (casting nullptr to void*) 2017-08-08 14:53:34 +02:00
Maciej Suminski e91ce300fb Cast nullptr to const void* to satisfy picky compilers 2017-08-08 14:47:27 +02:00
Maciej Suminski 262fcc91af Fixes for video cards unable to use gl{Un,}MapBuffer correctly
Fixes: lp:1685335
* https://bugs.launchpad.net/kicad/+bug/1685335

Fixes: lp:1683041
* https://bugs.launchpad.net/kicad/+bug/1683041
2017-08-08 14:26:05 +02:00
Maciej Suminski 46b5575c51 OpenGL driver debug routines 2017-08-08 09:31:57 +02:00
Maciej Suminski ef22c2589d Store forced cursor position in VC_SETTINGS 2017-08-07 08:59:32 +02:00
Maciej Suminski e8345dce51 Display GRID_HELPER auxiliary axes and snap points 2017-08-07 08:59:32 +02:00
jean-pierre charras b8c621a991 fix a few Coverity warnings. 2017-08-06 14:23:03 +02:00
jean-pierre charras 4e96f9990d Use the new color4Dpicker to choose a color in Eeschema.
However, the opacity is not modifiable because the wxDC used in Eeschema does not know the alpha channel.
2017-08-06 10:42:11 +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
jean-pierre charras 1f6854f2b8 Make internal errors messages not translatable 2017-08-01 13:12:59 +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
Maciej Suminski 76bd05a69b Prevent creating too many transitions by TOOL_MANAGER
- added TOOL_INTERACTIVE::resetTransitions()
- made protected and moved TOOL_BASE::setTransitions() to TOOL_INTERACTIVE
- TOOL_MANAGER calls TOOL_INTERACTIVE::resetTransitions() instead of
setTransitions()
2017-07-31 15:09:19 +02:00
jean-pierre charras e10f0c729b Fix minor compil warnings 2017-07-30 14:24:21 +02:00
Maciej Suminski 2652cfeafd Restore the cursor position after the context menu is closed
Fixes: lp:1696328
* https://bugs.launchpad.net/kicad/+bug/1696328
2017-07-28 10:55:38 +02:00
Maciej Suminski 7399759b3b Fixed polygon DRAWSEGMENT rendering in OpenGL GAL
Fixes: lp:1704542
* https://bugs.launchpad.net/kicad/+bug/1704542
2017-07-28 10:34:47 +02:00
Tomasz Włostowski b964569db7 pcbnew: enable net selection combobox in Track/Via properties dialog 2017-07-27 16:21:54 +02:00
Maciej Suminski 950d87a920 Removed boost::adaptor from ACTION_MANAGER 2017-07-27 16:06:30 +02:00
Maciej Suminski 75f68061a4 Save the drag origin only on the first click 2017-07-27 10:54:08 +02:00
jean-pierre charras 58c32367ee filter useless autosave tests, and optimization of autosave test in Eechema 2017-07-26 18:06:04 +02:00
Dick Hollenbeck 19e6bde09a Rewrite class UTF8 to contain rather than extend std::string storage.
This forces the compiler class specific features rather than borrowing
from the base class's std::string.  In some cases prior to this,
wxString( std::string ) was being called rather than UTF8::operator
wxString() leading to garbled wxStrings.

Added function UTF8::wx_str() which is of great convenience also.

Implicit conversions still work as before, and hopefully more reliably.
2017-07-26 08:30:12 -04: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
Oliver Walters 161045f17d Speed improvement for select / deselect in GAL
- No longer invalidates the item layers
- For multiple items, this results in a drastic speed improvement
2017-07-25 16:34:03 +02:00
Oliver Walters c27f5b725d Improved various error messages
- Moved developer "jargon" to details pane
- Changed error messages to "WHAT" rather than "WHY" or "WHERE"
2017-07-25 07:37:14 -04:00
Oliver Walters a0a3ca6646 Added extra information to error and info messages
Optional extra information string which is displayed in a drop-down "details" box
2017-07-25 07:37:13 -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 7be14f774d fixed plot menu labels 2017-07-21 10:19:29 -04:00
Maciej Suminski fe89fdfb24 Removed incorrectly defined assert 2017-07-19 13:05:30 +02:00
jean-pierre charras cb75b72978 Refinements if new color 4D selector 2017-07-19 11:26:28 +02:00
Maciej Suminski 984ac70106 Added COMMIT::GetStatus() and minor refactor
Moved duplicated code to a new function and added
an assert to warn against possible memory leak.
2017-07-19 10:46:10 +02:00
jean-pierre charras 5f4599fb56 Add a new color selector, to adjust color selection for GAL mode, with support of opacity (alpha channel)
Pcbnew: save opacity value in color config, and keep it when switching between legacy and gal mode.
2017-07-18 19:07:47 +02:00
Chris Pavlina 5755582c53 Minor FOOTPRINT_FILTER fix 2017-07-17 15:00:13 -06:00
jean-pierre charras ed66496242 Fix an issue (created by commit 16cb6a6ca0) when converting a color4D to a legacy color
Fixes: lp:1704724
https://bugs.launchpad.net/kicad/+bug/1704724
2017-07-17 09:59:34 +02:00
jean-pierre charras 16cb6a6ca0 color4d: fix incorrect conversion from rgb to HSV when r = g = b. 2017-07-16 17:10:24 +02:00
jean-pierre charras d3b382c281 GAL mode: the grid don't fill the full screen when moving the grid origin to negative values.
Fixes: lp:1703330
https://bugs.launchpad.net/kicad/+bug/1703330
2017-07-14 20:18:37 +02:00
Wayne Stambaugh e01eb29758 Symbol and footprint library table parser fixes.
Fix potential memory leak in both footprint and symbol library table
parsers when a duplicate library nickname entry exists.

Parse entire symbol library table before raising duplicate nickname
exception.

Improve the duplicate library table nickname error message to make
life easier for users to fix broken tables.
2017-07-13 10:09:38 -04:00
Maciej Suminski d5095252a0 eeschema: Fixed use-after-free on exit when paste operation is aborted 2017-07-13 13:33:13 +02:00
jean-pierre charras c93ab4d5da Fix possible crash and issues when a incorrect fp lib table is loaded:
correct lines are loaded, and pcbnew / eeschema is no more aborted.
Fixes: lp:1701627
https://bugs.launchpad.net/kicad/+bug/1701627
2017-07-12 20:24:35 +02:00
Maciej Suminski 08c4a0bc7b Fixed SELECTION_TOOL::selectCursor()
In the previous version the method did not work correctly
when an action was invoked from context menu. In such case,
the cursor position was obtained in the moment of selecting
the action, instead of using the right click location.
2017-07-12 09:34:20 +02:00
jean-pierre charras 969209c2cc Fix a few doxygen warnings and add a few comments. 2017-07-04 11:08:27 +02:00
Maciej Suminski 098814e205 Fixed a memory leak in BLOCK_SELECTOR 2017-07-04 10:14:58 +02:00
Maciej Suminski e18475f220 Renamed remaining constants to match the action (see ab44e7cc) 2017-07-04 10:08:33 +02:00
Kristoffer Ödmark 4fb2f80dd4 Eeschema copy/cut/paste to ctrl+c/x/v cut is now undoable Highlight net is now at ctrl+b by default 2017-07-03 16:41:47 +02:00
jean-pierre charras f074b57094 Pcbnew: fix minor issue in %TO.C advanced attribute, and avoid creating an unused D10 tool in Gerber files. 2017-07-02 16:41:31 +02:00
Maciej Suminski 3afef4e19d Display an error when pcbnew.kiface is not available for FP selector
DIALOG_COMPONENT_CHOOSE displays footprint preview when pcbnew kiface
is available, but it crashed when it was not in the same directory
as the executable. Now it displays an error message that allows the
user to quickly identify the problem.

Fixes: lp:1695005
* https://bugs.launchpad.net/kicad/+bug/1695005
2017-06-30 23:01:21 +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
jean-pierre charras 1e770f56a6 Fix a non ASCII7 string in a message. Only ASCII7 chars can be used in sources.
Non ASCII7 symbols are not allowed because the encoding is OS dependent.
2017-06-24 20:05:11 +02:00
jean-pierre charras 0719b99ad8 Minor enhancement in color selection on Windows 2017-06-24 10:45:26 +02:00
Tomasz Włostowski 5c0edbabab Fixes for the connectivity & board cleanup algorithms 2017-06-23 11:12:38 +02:00
Tomasz Włostowski de7f4d7aa4 fixed unresolved symbols while running cvpcb 2017-06-23 11:12:37 +02:00
Tomasz Włostowski 3b16d3cffe further DLIST/Iterators cleanup, some code formatting 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 996bcdf458 Fix a few doxygen warnings 2017-06-16 09:18:31 +02:00
jean-pierre charras 2476e88c9d Fix a few doxygen warnings 2017-06-15 13:13:24 +02:00
Wayne Stambaugh 66e97fa905 Doxygen comment improvements.
Fix lots of Doxygen warnings.

Fix Doxygen comment for IO_MGR::FootprintEnumerate() which was recently
changed.
2017-06-13 19:47:46 -04:00
Kristoffer Ödmark 19d5cc7548 Removed all exception specifiers since deprecated.
Exception specifiers are deprecated in cpp11, so went through them all
and removed them from the code.
2017-06-12 13:54:55 -04:00
Maciej Suminski dcc803ecb1 VIEW_CONTROLS::GetMousePosition() returns the mouse position in world coordinates. 2017-06-12 16:24:52 +02:00
jean-pierre charras ad48cd435d Replace SetToolID( ID_NO_TOOL_SELECTED, ...) by SetNoToolSelected() in code 2017-06-12 16:17:48 +02:00
jean-pierre charras 6ed4f9b208 Make EDA_DRAW_FRAME::SetToolID and mouse cursor shape setting working in GAL canvases, and uses same mouse cursor shapes in legacy and gal canvases.
Starting fixing incorrect UI behavior of Zoom to selection in Pcbnew.
2017-06-12 15:16:09 +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 526b5e2cd3 Fix broken behavior of the "Zoom to selection" tool in Gerbview and Eeschema. 2017-06-10 09:07:17 +02:00
Fabrizio Tappero 1a30b4fb05 Launch correct default system PDF viewer on Linux.
The is a bug in the wxMimeTypeManager object that sets the wrong default
PDF viewer on Linux.  Using wxLaunchDefaultApplication resolves the issue.

Remove angle brackets <> from error message as this causes issues with
controls that interpret HTML text.

Remove GetChars() from string formatting functions since it is not
required with wxWidgets 3 or greater.
2017-06-07 12:41:04 -04: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 e79f97860c Bezier2Poly refactor
Before the refactor library browser display Bezier curves correctly only
once, at other times they were just straight lines or crashed the
application.
2017-05-16 17:58:09 +02:00
jean-pierre charras 5ad1a13096 Fix a compil issue on Windows (W7 32bits). Could be an obscure conflict in var/keyword names. 2017-05-10 14:32:36 +02:00
Maciej Suminski b71fc5564a Code formatting fixes 2017-05-10 11:40:49 +02:00
Oliver Walters cd738297b0 SELECTION_AREA color now indicates selection mode
BLUE = Normal
GREEN = Addition
RED = Subtraction

Line color indicates "window" or "crossing" selection mode
2017-05-10 10:57:29 +02:00
Oliver Walters 1f1143743e HitTest improvement for EDA_TEXT 2017-05-10 10:57:29 +02:00
Oliver Walters b53ba56ac2 Use CTRL modifier to deselect items 2017-05-10 10:57:29 +02:00
Oliver Walters 8b49c6e5ed Alter selection area colours based on selection mode
- Left to Right is slightly blue (as current)
- Right to left is slightly green
2017-05-10 10:57:29 +02:00
Oliver Walters f338d46476 HitTest for Rectangular pads
HitTest for Rectangular pads

- Works at any rotation, even with Shape Offset
- Fixed bugs in D_PAD BoundingBox calculation
2017-05-10 10:57:28 +02:00
Oliver Walters f8734bd057 Fixed ::HitTest for Circle shape
- Testing against rectangle intersection now works correctly
- Previously tested against BoundingBox() not circle outline
2017-05-10 10:57:28 +02:00
Maciej Suminski 99f65f4dbf Added const T& to Eagle PCB import plugin methods 2017-05-04 15:44:14 +02:00
Alejandro García Montoro 9cf934ef17 Moves Eagle XML parser to common, replacing boost with wx.
All E'STRUCTS' are moved to common except for ERULES (which is
specific to pcbnew and needs its internal units), still in
pcbnew/eagle_plugin.{h,cpp}

In order to get rid of another boost dependency, this also changes
the parsing of the XML from Boost.PropertyTree to wxXml.

To replace boost::optional, an OPTIONAL_XML_ATTRIBUTE class has
been implemented. This could be replaced with std::optional when
C++17 is ready.
2017-05-04 15:29:45 +02:00
jean-pierre charras 4f2ed1b05f Plot gerber: fix a minor issue: an aperture attribute was incorrectly set on non copper layers when drawing some pads. 2017-05-04 08:55:17 +02:00
Wayne Stambaugh 096d9fbbf9 Pcbnew: continue loading footprints after first failure.
The footprint library cache handler would throw an exception on the
first error it encountered preventing all subsequent footprint files
from being parsed even if there was nothing wrong with them.  This
commit queues errors until all of the footprint files in the folder
have been parsed.

Fixes lp:1416736

https://bugs.launchpad.net/kicad/+bug/1416736
2017-05-03 15:27:07 -04: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
Oliver a39856485c Added component table dialog
- Allows grouping of matched components
- Bulk edit of components in a spreadsheet window
- User can choose to save / undo changes
- All changes are pushed to the undo stack in a single operation
- Export table to HTML / CSV output
2017-05-02 09:39:01 -04:00
jean-pierre charras c8706e9c15 Fix compil issue in Python support. 2017-05-01 14:19:38 +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
jean-pierre charras a92ea8c75b Fixes: lp:1687014 Footpring editor disappearing axes crosshair
https://bugs.launchpad.net/kicad/+bug/1687014
2017-04-29 11:43:02 +02: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 0e6723bb10 Fix color management in DXF files, broken since a long time. 2017-04-21 16:44:15 +02:00
jean-pierre charras 873e57e63e remove useless or incorrect wxASSERTs 2017-04-21 14:32:06 +02:00
Maciej Suminski 481fd233d4 Enable cursor snapping by default
Fixes: lp:1671869
* https://bugs.launchpad.net/kicad/+bug/1671869
2017-04-20 15:04:05 +02:00
Maciej Suminski 74847bf8ff Code formatting and clean-up 2017-04-20 14:01:38 +02:00
jean-pierre charras e97c91b025 Fixes: lp:1683128 (pcbnew: the cairo canvas ignore arc width)
https://bugs.launchpad.net/kicad/+bug/1683128
2017-04-16 19:21:31 +02:00
jean-pierre charras 88105f891f Fixes Pcbnew bug: Drag Zone Outlines no longer working in legacy view 2017-04-16 18:32:47 +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
Miles McCoo b321efffaf Minor Pcbnew Python scripting fix to expose SHAPE_POLY_SET interface
The recent refactoring work to move zones from CPolyLine to
SHAPE_POLY_SET resulted in a reduction in pcbnew's python
capabilities.  This change exposed SHAPE_POLY_SET to restore
that functionality (albeit with slightly different method names)
2017-04-14 10:23:42 -04:00
Konrad Beckmann c4ea54227e Remove redundant statement in DSNLEXER::PopReader 2017-04-13 14:03:37 -04:00
Simon Wells 117faf898f Disable icons in menus by default on osx 2017-04-13 13:49:55 -04:00
jean-pierre charras 80371134d7 better fix than commit 6c083ebf4c, because the issue was existing in other dialogs
Fix incorrect frame deletion, only noticeable when eeschema is run in stand alone mode.
After selecting a footprint using the footprint viewer, the application cannot be closed.
Reason:
the footprint viewer ctor creates an instance (not shown) of a FRAME_PCB.
Unfortunately, this pcb frame was not deleted by Eeschema, in stand alone mode,
preventing the application to be closed because a frame was still active after closing the schematic editor frame.
Now the footprint viewer ctor delete this instance after use, if it was not previously existing.
2017-04-13 18:28:16 +02:00
jean-pierre charras 6c083ebf4c FOOTPRINT_SELECT_WIDGET: fix incorrect frame deletion, only noticeable when eeschema is run in stand alone mode.
After selecting a footprint using the footprint viewer, the application cannot be closed.
Reason:
the footprint viewer ctor creates an instance (not shown) of a FRAME_PCB.
Unfortunately, this pcb frame was not deleted by Eeschema, in stand alone mode,
preventing the application to be closed because a frame was still active after closing the schematic editor frame.
2017-04-13 15:17:30 +02:00
jean-pierre charras 57ded58231 Cvpcb: fix not working footprint filtering by component keyword. 2017-04-11 08:27:20 +02:00
jean-pierre charras ba37d6fca3 Temporary fix of broken command add corner to zone in GAL mode.
Fixes: lp:1680339
https://bugs.launchpad.net/kicad/+bug/1680339
2017-04-06 19:04:47 +02:00
Maciej Suminski bf590780b8 Do not store 'force cursor position' setting in VIEW_CONTROLS::SETTINGS
Fixes: lp:1678875
* https://bugs.launchpad.net/kicad/+bug/1678875
2017-04-04 00:57:54 +02:00
jean-pierre charras 6eb2000b69 fix Coverity warning (CID 151565) (CID 155147) 2017-04-01 20:05:33 +02:00
jean-pierre charras 04e24282a8 Fix bug: Render->Grid(Color) doesn't saved between kicad sessions.
Fixes: lp:1670084
https://bugs.launchpad.net/kicad/+bug/1670084
2017-04-01 11:48:02 +02:00
Wayne Stambaugh 9c2ebf32f1 Initial symbol library table implementation prep work.
Add loading symbol library table code to schematic PROJECT object.

Fix minor issues with loading global symbol library table.

Add default symbol library path environment variable to the environment
variable list and change the variable name to KICAD_SYMBOL_DIR.

Add code to SCH_SCREENS to test if all library nicknames of the symbol
library IDs are empty.

Remove unnecessary KICAD_USE_SCH_IO_MANAGER build option.
2017-03-31 16:29:34 -04:00
John Beard c3ff34e0df Add reset text attributes function to GAL - use for arc tool
Independent drawing functions (that don't expect any particular state to
be set up fo them) on the GAL need to reset the GAL properties they
use. This adds GAL::ResetTextAttributes() to make this easier.

This is important, as failing to reset mirroring can cause asserts in
OpenGL.

This is used in the Ruler tool (which previously did it one attribute at
a time) and also the Arc layout assistant, which previously failed to
reset mirroring.

Also reset on GAL construction, as these members appear to be
uninitialised.
2017-03-31 15:59:31 +02:00
Jon Evans 8cd1df0524 Add output stream operator for COLOR4D 2017-03-31 06:48:04 -04:00
Chris Pavlina 3234087dc9 Move wxDataViewCtrl manipulators out of dialog_choose_component.cpp
Fixes: lp:1677925
* https://bugs.launchpad.net/kicad/+bug/1677925
2017-03-30 21:47:14 -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
John Beard ef9f8d40c6 Init GAL class members (Coverity fixes)
Fixes: CID 157139 (GAL)
       CID 157138 (CAIRO_GAL)
2017-03-30 16:05:56 +02:00
John Beard fc7dad600f Ruler tool: reset text mirror/bold/italic before painting
This is required as the OpenGL GAL doesn't support mirrored
text, and if the state is not cleared after painting other mirrored
text, this is what is attempted.

Fixes: lp:1677210
* https://bugs.launchpad.net/kicad/+bug/1677210
2017-03-29 23:27:44 +02:00
Chris Pavlina c8cdb51fa8 Add relational operators to component search
Fixes: lp:1578264
* https://bugs.launchpad.net/kicad/+bug/1578264
2017-03-27 21:26:49 -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
Chris Pavlina 849b3c2a4b Add footprint select dropdown to component chooser, serious refactoring
- DIALOG_CHOOSE_COMPONENT has footprint select widget
- FOOTPRINT_SELECT_WIDGET
- FOOTPRINT_CHOICE widget (customized wxComboCtrl)
- FOOTPRINT_FILTER class
- FOOTPRINT_INFO rework:
    - FOOTPRINT_ASYNC_LOADER to load without freezing UI
    - Rewrite loader threads as queue-driven thread pool
    - Make FOOTPRINT_INFO available via kiway
- FP_LIB_TABLE::PrefetchLib
- Access to global fp-lib-table via kiway
- SYNC_QUEUE threadsafe queue template
- Remove KICAD_FOOTPRINT_SELECTOR build option
2017-03-24 09:20:27 -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 5aa1610362 Remove unused g_ShowPageLimits global variable
This variable was only defined, not declared in any header.
2017-03-23 12:47:05 -04:00
John Beard f723a5319c Move some unit related util function to base_units.h 2017-03-23 12:47:05 -04:00
John Beard e98ae3e463 Move executable name constants to own file
The executable name constants are only used by two files, they do not
have to be in common.h.

Also converted to const wxString for better type-safety and removed
old-style wxT macros.
2017-03-23 09:23:45 -04:00
John Beard ece7eeb280 Move SystemDirsAppend to own header
This function is called only from three sites, it doesn't need to be in
common.h.

The implementation was already in systemdirsappend.cpp, so a matching
header was created for it.

This reduces the visibility of the function to only the files that need
it and slightly shrinks common.h.
2017-03-23 09:23:45 -04:00
John Beard 27374c0aa3 Move file locking utilities to a separate file
The global ::LockFile() function is used in a single place, but it's in
common.h, so visible to all files.

The GetKicadLockFilePath function is used in only two places, and one of
them is LockFile.

This commit puts them both in a separate header, so they're only visible
to code using them.

The implementation of GetKicadLockFilePath is moved to lockfile.cpp,
where LockFile already was.

Also removed a (large) handful of wxT macros, which aren't needed any
more and make code less readable.
2017-03-23 09:23:45 -04:00
John Beard 0799d9e45c OPENGL_GAL: Init currentTarget
The currentTarget member of OPENGL_GAL is not initialised, but the
currentManager member is.

This commit uses SetTarget to initialise both target and manager to a
consistent state at construction.
2017-03-23 14:08:26 +01:00
John Beard 9fe780f1b3 Rework zone creation in GAL
The zone creation in DRAWING_TOOL was a complex event loop whici
simultaneously managed the event handling, construction of the preview
polygon and the creation and commiting of the zone, all in the same
scope. This has been broken into several pieces:

* POLYGON_ITEM preview item, used to preview the polygon in progress
* POLYGON_GEOM_MANAGER is a class that collects points from user input
  and used them to describe a polygon's geometry, including calculation
  of 45-degree constrained leader lines
* ZONE_CREATE_HELPER is a class which deals with creating zones based on
  geometry from a geometry manager and parameters from the DRAWING_TOOL
* The (much simpler) event loop in DRAWING_TOOL drives the
  POLYGON_GEOM_MANAGER. With a minor refactor, this loop can be reused
  in future for other polygonal tools if wanted.

The polygon preview now has a translucent fill which makes it easier to
visualise the zone.

This also adds the Close Zone Outline and Delete Last Corner actions as
part of the new event loop.

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

Fixes: lp:1667885
* https://bugs.launchpad.net/kicad/+bug/1667885
2017-03-22 17:18:12 +01:00
John Beard d99fbddc22 Enable angle snap for pcbnew GAL ruler tool
This uses the two-point geometry manager to split the logic of the ruler
geometry and the preview item display. This allows the ruler to use that
manager's angle snap feature.
2017-03-22 10:59:47 +01:00
Maciej Suminski ddf4f3b2bc Remove not used cursor fields & methods in Cairo GAL 2017-03-22 10:37:43 +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
John Beard 01c733bdb5 Dim GAL cursor when forced but no interactive tool
This makes it clearer when a tool is active, otherwise interactive tool
effects like auto-pan can come as a surprise when the cursor is forced
to display all the time.
2017-03-22 10:24:48 +01:00
John Beard 78a5185857 Allow GAL cursor to be always displayed
A new items is added to the GAL display options (and the dialog), and a
hotkey (Ctrl+Shift+x) is added to toggle it.

Fixes: lp:1673633
* https://bugs.launchpad.net/kicad/+bug/1673633
2017-03-22 10:04:56 +01:00
jean-pierre charras c20cf4a3e0 Fix incorrect calculations in GAL DrawGrid() methods, that create very long calculation time when the grid origin is not 0 2017-03-21 13:09:24 +01:00
jean-pierre charras c2227abb36 Specctra import: accept layer names like numbers (i.e. +12). 2017-03-20 19:50:07 +01:00
jean-pierre charras 230980fc9d Compile specctra file with pcbnew files, not with pcbcommon files (they are now used only by pcbnew) 2017-03-20 19:49:10 +01:00