Commit Graph

2874 Commits

Author SHA1 Message Date
Maciej Suminski b8350f037b COMMIT: Added an interface to store items that already have a copy created. 2016-09-12 11:50:06 +02:00
Maciej Suminski 0223425d30 COMMIT: changed BOOST_FOREACH to for. 2016-09-12 11:50:06 +02:00
Maciej Suminski dac7c5aa1f Store parent object when creating a COMMIT. 2016-09-12 11:50:06 +02:00
Tomasz Wlostowski 9588a7974c Added classes COMMIT & BOARD_COMMIT. 2016-09-12 11:50:06 +02:00
Maciej Suminski b5bfa14057 Removed unused EDA_ITEM::m_Image field. 2016-09-12 11:50:06 +02:00
Maciej Suminski 1dd43d1d98 Unified undo buffer handling code for PCB & module editor.
Replaced UR_MODEDIT with UR_CHANGED.
2016-09-12 11:50:06 +02:00
Maciej Suminski 09e0311d4e Replaced Copy() method with operator=. Removed Copy() where default copy ctor was enough. 2016-09-12 11:50:06 +02:00
Maciej Suminski f95628c132 Switched to default constructor and operator= for EDA_TEXT. 2016-09-12 11:50:06 +02:00
Ian Roth 7ad2f37391 Add %L formatter to worksheets to print layer name. 2016-09-10 14:23:59 -04:00
Chris Pavlina 7318238daa Update version string formatting after git migration
It is no longer necessary (or sensible) to include a simulated bzr
revision number, and we can reliably get a branch name now. Therefore,
the new version strings look like:

(2016-08-26 revision 67230ac)-master
 |                   |        |
 |                   |        branch name, "HEAD" if not on a branch,
 |                   |          or "unknown" if no .git present
 |                   |
 |                   abbreviated commit hash, or no-git if no .git
 |                     present
 |
 date of commit, or date of build if no .git present

Signed-off-by: Chris Pavlina <pavlina.chris@gmail.com>
2016-09-09 20:19:54 -04:00
Nick Østergaard 76f78bb48b Remove unused version info
USE_FP_LIB_TABLE is not used anywhere in the code when grepping
2016-09-04 19:14:26 -04:00
Nick Østergaard c784d45ed7 Add new development build swtiches to version info
Add:
* KICAD_USE_SCH_IO_MANAGER
* KICAD_USE_OCE
2016-09-04 19:13:05 -04:00
Wayne Stambaugh cbcb3b896b Fix incorrect string translation macros.
* Replace _T() with _() for translatable strings.

* Don't translate debug messages.

* Don't translate copyright symbol.
2016-09-03 12:10:49 -04:00
Chris Pavlina 4b6d28333e Revert "Memoize SHAPE_LINE_CHAIN bounding box computation"
This reverts commit 30566de69a, which
caused some issues in PNS.
2016-09-01 12:09:06 -04:00
Wayne Stambaugh 9287b42648 Revert commit 67230ac8e7. 2016-08-30 09:04:25 -04:00
jp-charras 26b1c732de Simulator: add simulator icon, and colored icons to identify more easily traces in trace list and cursor list. 2016-08-29 11:39:54 +02:00
Niki Guldbrand 67230ac8e7 Keep Source tree clean
* Move all generated files to the build tree during build so the source
  tree is kept clean.

Signed-off-by: Niki Guldbrand <niki.guldbrand@gmail.com>
2016-08-26 17:25:12 -04:00
Maciej Suminski 7f5bce3772 More robust condition for checking sufficient space in CACHED_CONTAINER
Having enough space is not enough, we need a continuous block of memory.
2016-08-18 17:18:13 +02:00
Maciej Suminski 9f0b42cb35 pns: fixed a few memleaks & conditional jumps depending on uninitalized variables 2016-08-17 15:09:48 +02:00
Simon Richter bfb6e0bbb2 Convert remaining occurences of stri[n]cmp to str[n]casecmp.
This also reverses the substitution logic if strcasecmp is missing (config.h.cmake)
2016-08-16 10:27:09 +02:00
Tomasz Wlostowski e5524832a9 pcbnew: added diff pair gap & width to Design Rules dialog & PCB file format. 2016-08-15 17:16:49 +02:00
Maciej Suminski 9714ece53f Initialize bestStep (wxMathPlot) 2016-08-15 10:53:36 +02:00
Simon Richter eec632a651 Remove definition of log10(double) in wxMathPlot widget 2016-08-15 10:19:42 +02:00
jean-pierre charras 5ed19b6e82 Dialogs for simulator: cosmetic enhancements, make them translatable and resizable. Remove 2 printf used in debug. 2016-08-15 09:53:15 +02:00
jean-pierre charras 42f9be4019 uncrustify mathplot.cpp, make debug strings not translatable, and remove not compilable debug lines (due to changes in internal code). No actual change in code. 2016-08-12 10:10:33 +02:00
Chris Pavlina 30566de69a Memoize SHAPE_LINE_CHAIN bounding box computation
For a specific project+system combination, this gives a 38% speedup on
the pcbnew side of netlist sync.
2016-08-11 09:34:58 -04:00
Maciej Suminski 557f9270c7 wxMathPlot basic code formatting 2016-08-11 14:42:18 +02:00
jp charras b2f60009a6 wxWidgets 3.1/Win7 fixes 2016-08-11 14:42:15 +02:00
Maciej Suminski 67e283c3af Removed 'Lock aspect' from wxMathPlot widget context menu 2016-08-11 14:42:12 +02:00
Tomasz Wlostowski b20f941bd0 sim: hopefully final version of plot axis unit/suffix handling. 2016-08-11 14:42:10 +02:00
Maciej Suminski 63bdb3995e Fixes for limited view panning 2016-08-11 14:42:08 +02:00
Tomasz Wlostowski e9609fe19d mathplot: removed some warnings, fixes to labelling code 2016-08-11 14:42:04 +02:00
Maciej Suminski 9d8b40b93d Reset scales when a plot is removed 2016-08-11 14:42:03 +02:00
Tomasz Wlostowski f4033f776f mathplot: fix freeze in scale ticks calculation 2016-08-11 14:42:02 +02:00
Tomasz Wlostowski d0e1f2e412 mathplot: silence debugging messages 2016-08-11 14:42:01 +02:00
Maciej Suminski 5c32e35d27 Minor fixes to wxMathPlot 2016-08-11 14:41:56 +02:00
Maciej Suminski b25781814d Fixed cursors 2016-08-11 14:41:55 +02:00
Tomasz Wlostowski e8d6a42e1a simulator: working on magnitude/phase plots 2016-08-11 14:41:49 +02:00
Tomasz Wlostowski b9e31f6d3a mathplot: further improvements for simulator [wip] 2016-08-11 14:41:49 +02:00
Tomasz Wlostowski 30c87527da mathplot: slave scale locking [wip] 2016-08-11 14:41:48 +02:00
Tomasz Wlostowski d2f4d5c2fb mathplot: various improvements, added log scale [wip] 2016-08-11 14:41:48 +02:00
Maciej Suminski 06463252d7 wxMathPlot: Limited zooming and panning 2016-08-11 14:41:37 +02:00
Maciej Suminski f634cff206 wxMathPlot: Removed mouse help related functions 2016-08-11 14:41:36 +02:00
Maciej Suminski fd08f45bd2 Corrected bounding box calculation in mpLayer 2016-08-11 14:41:36 +02:00
Maciej Suminski a35e324c3f Mouse controls in simulation plot made coherent with the rest of KiCad 2016-08-11 14:41:27 +02:00
Maciej Suminski 9c65d0d281 wxMathPlot: fixed crash when one of its dimensions == 0 2016-08-11 14:41:26 +02:00
Maciej Suminski 51906625ee Replaced sim plotting widget with wxMathPlot 2016-08-11 14:41:21 +02:00
Maciej Suminski 549a96da0b License for KIWAY_HOLDER 2016-08-11 14:41:15 +02:00
Tomasz Wlostowski f1f69979e6 ngspice: something starts to work 2016-08-11 14:41:01 +02:00
Maciej Suminski cdc951d0a3 Fixed a crash when dragging a line was interrupted
Crash was caused by removing an element from m_activeTools list, causing other iterators to be invalidated.
2016-08-08 17:20:02 +02:00
Maciej Suminski c6e4f67589 Fixed cached container data corruption on resize (OpenGL GAL) 2016-08-08 14:18:25 +02:00
Maciej Suminski 9f5f0ab31b Minor OpenGL GAL code changes 2016-08-08 14:17:40 +02:00
Michael Steinberg 86496d3141 Pcbnew: fix dangling board reference crash in GAL. (fixes lp:1584489) 2016-08-05 13:45:14 -04:00
jean-pierre charras 498c8ce61d Fix issue: When left-clicking on the "window frame" (blue top area on Windows) (Any editor), the window jumps to bottom half of the screen, if a context menu is currently opened (could be Windows specific) 2016-08-05 16:10:45 +02:00
Maciej Suminski c9a41be774 Added licence for the GAL bitmap font 2016-08-03 17:02:43 +02:00
decimad 532634abf2 fix reentrant tool state crash 2016-08-02 10:34:27 +02:00
Mrio Luzeiro d8eab321f7 3D Viewer: complete refactor of the 3D viewer.
* Split and rewrite the preview window and canvas.
* Create a new class for handling the board information.
* Adds new render targets: openGL, legacy, and ray tracing.
* Render targets take full advantage of the new 3D plugins system and 3D cache
  for a fast 3D model loading.
* Faster board loading.
* New OpenGL render is faster than the old one.
* New ray tracing render target with a post processing shader.
* Use of new 3D plugins (WRL, X3D, STEP and IGES) and 3D model caching.
* Preview of 3D model while browsing the file name.
* 3D preview of the footprint while adding / align 3D shapes.
* Render of 3D models according to attributes: Normal, Normal+Insert, Virtual.
* Pivot rotation centered in one point over the PCB board.
* Shortcuts keys improved for XYZ orientation..
* Animated camera.
2016-07-19 13:35:25 -04:00
jean-pierre charras ee40137de7 more about dlg size fixes and osx fixes 2016-07-14 19:30:25 +02:00
jean-pierre charras 98bc4d3ba1 Fix dialog size issues (some widgets have a incorrect size when initialized inside a TransferToWindow() method because the SetSizeHints() method was called before the init) and fix OS X copy/close bug in a few dialogs. 2016-07-14 16:25:35 +02:00
Dick Hollenbeck c2b8a4ee43 Move from class INSPECTOR as the EDA_ITEM::Visit() callback interface to a std::function
callback.  This improves conciseness and encourages use of Visit() due to the lower cost
of entry in C++.
2016-07-12 15:05:54 -04:00
Wayne Stambaugh 98ad5096b0 Eeschema: add saving schematic files to schematic plugin.
* Add SCH_PLUGIN::Save() for current file format and code for saving all
  SCH_XXX objects.

* Add function to SCH_FIELD to get the position of the field in the component
  not the position added to the component position which is what GetPosition()
  does.  This was required because saving the component field expects position
  of the field sans the position of the component.

* Remove public members from BITMAP_BASE object and fix all associated
  code.

* Fix the never ending coding policy violations found making these changes.
2016-07-11 15:48:46 -04:00
Jon Neal 095063dbd9 Remove code since minimum wxwidgets version is 3.0.0.
This issue was fixed in 2.9.2 according to
https://lists.launchpad.net/kicad-developers/msg06421.html
2016-07-10 23:10:03 -04:00
Wayne Stambaugh 4ed346ea64 Eeschema: initial schematic I/O plugin.
* Factor out PROPERTIES object from the PCB plugin code and move it into
  common so it can be used by both the Pcbnew and Eeschema plugins.

* Add schematic I/O plugin manager for loading and saving schematic and
  component library files.

* Add initial attempt at a parser for current schematic file format.  This
  parser will be infinitely more strict than the current parser which is very
  forgiving in what it parses.

* Make minor changes to the base bitmap class to support the new parser.

* Add find root sheet support to sheet object to allow fetching the root
  sheet from any sheet in the stack.
2016-07-06 05:22:56 -04:00
Michael Steinberg 06d4894fdb boost::context fixes to make it compatible with boost 1.61 2016-07-05 00:14:32 +02:00
Maciej Suminski 33e7fe6211 Fix a crash caused by invalid iterator (thanks to Michael Steinberg)
TOOL_MANAGER::finishTool() caused iterator to become invalid when an element was removed from the m_activeTools deque.
2016-07-04 16:12:21 +02:00
jean-pierre charras 4a20f376a3 Move call of SetSizeHints in a few dialogs form the dlg ctor to a wxInitDialogEvent event, because some widgets sizes are not fully initialized before this event is fired.
It is especially true in some Window Managers like KDE, but can be true in any WM, when initializations are made by TransferDataToWindow() method, called by the default wxInitDialogEvent handler.
2016-07-02 18:32:03 +02:00
jean-pierre charras 1ab1dca46c Try to fix initial widgets size calculations on KDE, when using notebooks in dialogs 2016-07-02 16:13:10 +02:00
jean-pierre charras 0eea3cffcf DIALOG_SHIM: add void FinishDialogSettings() method which calls the usual methods at end of a dialog, to ensure proper size and position, the first time the dialog is called.
Fix an incorrect size of dialog_pcb_text_properties (due to the fact the dialog was not really initialized when its min size was calculated)
2016-07-02 11:35:52 +02:00
Simon Richter 1b2fd6a382 Replace BOOST_FOREACH with C++11 range based for. 2016-06-29 16:07:55 -04:00
Simon Richter da5699de0a Replace boost::shared_ptr with std::shared_ptr. 2016-06-29 11:09:55 -04:00
Michael Steinberg fde12ebd25 Replace boost::function and boost::bind with their std:: counterparts 2016-06-29 12:23:11 +02:00
jean-pierre charras 7fd30e6dc0 Fix a (minor) issue in Kicad manager: when the schematic editor or the board editor are run from the project tree frame to edit files of the current project, editors are opened on the background. 2016-06-17 19:58:14 +02:00
Maciej Suminski b82ccc3b4e Reverted 6912 with minor changes (LockCtx requires to specify canvas that locks a context). 2016-06-13 16:43:33 +02:00
jean-pierre charras c4b22b55a0 Bug fix: When using the %Y variable placeholder in a worksheet template, the %Y variable content overwrite the whole string. 2016-06-13 21:02:10 +02:00
Maciej Suminski 57d4e8d51d Fixed OpenGL crash on canvas switch. 2016-06-13 09:35:36 +02:00
Chris Pavlina 81144c2476 Move hotkey list from Preferences menu to Help menu 2016-06-11 21:22:13 -04:00
Chris Pavlina 9eef653625 Remove legacy option to zoom to selection on middle mouse button
This feature was not reliably available: neither pl_editor nor GAL supported
it. It has been replaced over the past few commits with a new zoom-to-selection
tool available in all applications and modes.
2016-06-11 19:37:43 -04:00
Chris Pavlina d49ecb1b91 Add zoom-to-selection and block move to pl_editor 2016-06-11 09:51:05 -04:00
Wayne Stambaugh 21595f48d3 KiCad: fix crash when kiface libraries are missing. (fixes lp:1577786)
* An assumption was made that wxDynamicLibrary.Load() would always result in
  a wxLogSystemError on failure which was not always true.  The code now throws
  an exception which is caught by KiCad and an error message is displayed.  In
  the case where the wxLogSystemError is shown, there will be an annoying two
  error messages but that is better than a crash.
2016-06-10 13:47:19 -04:00
Maciej Suminski b7ec4ea160 Corrected the last instance check in OPENGL_GAL. 2016-06-10 17:07:12 +02:00
Maciej Suminski 5850b1ced0 GL_CONTEXT_MANAGER: Call SetCurrent() only when a different context is used. 2016-06-10 17:06:54 +02:00
Simon Richter eb45f02138 Avoid pointer truncation in debug message 2016-06-10 11:06:47 +02:00
Maciej Suminski aa9681e979 GL_CONTEXT_MANAGER: Call SetCurrent() only when a different context is used. 2016-06-09 13:44:59 +02:00
jean-pierre charras cdf2b6950e Legacy mode: Pan with mouse middle button fix an unwanted displacement of the drawings (half width of scroll bars) when starting the pan (due to a parameter (new reference position of scroll bars in IU) which was stored with an incorrect value)
Minor enhancement during pan: the mouse cursor shape is modified.
2016-06-09 10:43:32 +02:00
Chris Pavlina 8c01318141 Add zoom-to-selection tool 2016-06-08 07:19:53 -04:00
Chris Pavlina ce3ccec528 Fix incorrect scaling in scrollbar fix (r6895, 35883bb)
...how did this ever look like it worked?
2016-06-08 06:26:39 -04:00
Simon Richter 2928cb7419 Replace unshared boost::shared_array with std::unique_ptr 2016-06-08 09:43:07 +02:00
Chris Pavlina 35883bb74b Account for scrollbars when centering 2016-06-07 20:28:11 -04:00
jean-pierre charras 11c369ee1b Fix minor compil warnings (deprecated warnings and shadowed local vars warnings) 2016-06-07 17:33:12 +02:00
Maciej Suminski 3fcae6b120 Fixes for OpenGL resources handling. 2016-06-07 14:42:42 +02:00
jean-pierre charras 6d1e904334 Code cleanup: Remove outdated decimils to/from iu defines and conversion functions (decimils are no more in use since a long time).
Remove convert_from_iu.h file, only used for one define, and containing brokenand duplicate defines. Only convert_to_biu.h is now used.
2016-06-05 13:49:25 +02:00
jean-pierre charras 2b459acfe9 Fix incorrect handling of Aperture Macros, especially when using exposure OFF in macros.
Aperture macro shapes are now drawn using polygons.
2016-06-03 18:42:24 +02:00
Maciej Suminski b4ad18a3ea Do not rebuild shaders on each OPENGL_GAL construction. 2016-06-03 15:46:13 +02:00
Maciej Suminski b83c148e10 Delete OpenGL context on GLCanvas subclasses destruction. 2016-06-03 15:46:13 +02:00
Maciej Suminski 68b6da57c0 Removed OPENGL_GAL::instanceCounter. 2016-06-03 15:46:12 +02:00
Maciej Suminski 01f32dd52c GL_CONTEXT_MANAGER class to avoid unexpected GL context switches. 2016-06-03 15:46:12 +02:00
Maciej Suminski 4f7bb4c0f7 Simplified error checking in OPENGL_GAL test. 2016-06-03 15:46:11 +02:00
jean-pierre charras 3e2cae946c Corrected wxDC objects used by EDA_DRAW_PANEL_GAL & OPENGL_GAL. 2016-06-03 15:46:11 +02:00
Chris Pavlina e8dba1c14b Remove unnecessary and possibly problematic optimization
https://bugs.launchpad.net/kicad/+bug/1280897
2016-05-30 08:26:39 -04:00
José Ignacio Romero 5832e37177 GAL: Fix offset problem in multiline text rendering
Commit BZR 6703 introduced a minor horizontal adjustment for stroke
text rendering in GAL, but the Translate() call was done before
calling Save(). So, when this function was called multiple times a
residual offset carried over to each subsequent line.

bzr 6703 = git 67982a4
2016-05-29 17:40:11 -04:00
jean-pierre charras 1ae9175671 A few minor fixes for compil warnings (shadowed variables and deprecated auto_ptr) 2016-05-29 17:02:34 +02:00
jean-pierre charras ca0113ab65 Fix my previous commit: I committed the wrong file 2016-05-28 21:51:35 +02:00
jean-pierre charras b7f863dc4c Fix the commit 6838 (Fix non optimal position of net name and pad name in GAL mode), broken. 2016-05-28 21:46:13 +02:00
Simon Richter 7cee73e8e5 Narrow assumption on OpenSSL use 2016-05-28 13:11:24 -04:00
Simon Richter 96ec9db5d6 Add missing C++ stdlib headers
The GCC standard library headers often include other headers, which makes
some code compile that forgets to include several headers.
2016-05-28 12:46:29 -04:00
Simon Richter f7fdf43ea8 Use std::atomic for portable locale init counting 2016-05-28 12:46:22 -04:00
Maciej Suminski ade1d1fe74 Fixed display of 'b' letter in OpenGL canvas. 2016-05-27 14:44:44 +02:00
jean-pierre charras 5065961cf5 Gerbview: code refactoring:
* move gerber_file_image_list class to a separate file
* better BestZoom calculation, and fix incorrect size of wxTextCtrl showing info about gerber file format.
* remove useless file and dead code. Remove not used parameters in some classes (mainly in class_gerber_draw_item)
2016-05-27 10:34:10 +02:00
jean-pierre charras 4d82be5f0e Gerbview: more code refactoring: remove useless files. Fix a few issues or bugs. 2016-05-27 10:20:17 +02:00
Maciej Suminski 25d526cbc6 Fixed a crash when GRLineArray is called with an empty vector. 2016-05-26 17:14:08 +02:00
Maciej Suminski 2ded7bf82a Improved error handling for SHADER class. 2016-05-23 09:54:53 +02:00
Maciej Suminski 3ca7026aa0 More robust checks for OpenGL canvas visibility. 2016-05-20 12:06:08 +02:00
Simon Wells 74d69b6a80 multiple monitor loses window when single monitor 2016-05-23 10:51:17 +02:00
jean-pierre charras bbe42d0f47 Fix very minor issues: compil warnings (mainly deprecated and shadowed vars warnings). 2016-05-22 19:39:20 +02:00
ejs-ejs f8ae428428 Add Lithuanian language to language list menu. 2016-05-22 12:31:08 +02:00
Simon Wells a9d08a620e Hide OpenGL scrollbars on OS X to fix freeze
Fixes: https://bugs.launchpad.net/kicad/+bug/1553428
2016-05-21 19:38:47 -04:00
jean-pierre charras 620ccc5483 Try to fix a compil issue on OSX (no viable conversion from 'const wxString' to 'const wxChar *', in colors.cpp) 2016-05-17 09:10:15 +02:00
Dick Hollenbeck 0715504a9e remove support for in processing setting of ld library path 2016-05-16 21:04:20 +02:00
jean-pierre charras 74d3cfd688 Make color names translatable in color selection dialog. 2016-05-16 20:35:34 +02:00
Chris Pavlina 0f407a756c Pull existing settings into Doxygen module 2016-05-12 15:45:47 -04:00
Chris Pavlina 84d3fbfd68 Remove MaxUndoItems, make devel option DevelMaxUndoItems
Begin documenting configuration keys in Doxygen
2016-05-12 12:51:32 -04:00
Chris Pavlina a488cb0142 Sanity-check loop bounds in SHAPE_LINE_CHAIN::Parse
Coverity CID: 128540
2016-05-11 23:28:08 -04:00
Chris Pavlina ac3cd950b1 Fix ignored result of TransferDataToWindow in DIALOG_SHIM
Coverity CID: 147343
2016-05-11 23:27:57 -04:00
jean-pierre charras 6a7544a2ca Fix a few deprecated compil warnings in dialogs generated by wxformbuilder 2016-05-11 10:51:07 +02:00
Chris Pavlina 540275fe44 OS X: Disable full-screen cursor
This feature cannot work reliably for reasons explained in lp:1463505. Remove
the option on OS X builds and force cursor to the small one.

https://bugs.launchpad.net/kicad/+bug/1463505

> Bernhard Stegmaier (stegmaier) wrote on 2016-01-14:
>
> As far as I see from the code this is no bug but done on intention.
>
> The reason probably is that on OSX in the legacy canvas you don't have the
> XOR-drawing as on other platforms. To the best of my knowledge, this would
> mean that on every mouse move you would have to repaint the whole window just
> to get rid of the "old" cross.
>
> So, I would say this is a clear "won't fix".
> We could think of just removing/disabling the button in the legacy canvas.
2016-05-10 23:33:24 -04:00
Chris Pavlina f9386fcbc0 Add support for PCB and footprint format versioning
Currently, kicad_pcb files have a (version ...) tag, but it is ignored. This
commit does the following:

1. Parse the version. If it's later than the last supported version, present an
alternative error message suggesting an upgrade if the file does not load
correctly. The version will be interpreted as an integer YYYYMMDD to suggest
a KiCad release date.

2. Accept a (version ...) tag also in kicad_mod files, but do not write them
yet. If no version tag is present in these files, assume the version to be that
of the current format version at the time of this commit.

This is meant to be merged to the 4.x stable series, and preps for KiCad 5
which will start emitting version tags also in footprints - users with what
will then be 'old stable' will not get a parse error when we introduce this for
footprints, and we can safely increment the format version later.
2016-05-10 15:07:35 -04:00
jean-pierre charras ec096cc1d2 Fix an issue in LOCALE_IO class, used to switch to/back locale "C" when reading/writing files: the back to locale was broken, and created issues in countries using the ',' as fp separator, especially when the non default language was used.
It was reported in many bugs.
2016-05-10 09:11:09 +02:00
jean-pierre charras bfeb61abef Fix a few shadowed local variables and deprecated warnings in dialogs (using a very recent wxformbuilder version). 2016-05-10 08:56:03 +02:00
Maciej Suminski a42cb0ef8c OpenGL GAL: Set context in destructor when possible (under Linux the window has to be visible). 2016-05-09 18:00:34 +02:00
Maciej Suminski d9f4877c94 Fixed a crash when starting pcbnew with OpenGL GAL. 2016-05-09 17:23:01 +02:00
jean-pierre charras 63decd70e6 Minor fixes: Fix a few shadowed local variables, and deprecated warnings is a few dialogs generated by wxFormbuilder (using a very recent wxFormbuilder version, after apr 25, 2016) 2016-05-06 17:15:30 +02:00
Collin Anderson 08b52131df Fix beep on hotkey press in OS X 2016-05-05 11:34:16 -04:00
Maciej Suminski cca36d355a Remove unnecessary debug messages (OpenGL GAL). 2016-05-04 10:10:15 +02:00
Maciej Suminski 22c4e4d240 Set OpenGL context only when the parent window is visible. 2016-05-03 16:39:58 +02:00
Maciej Suminski 55976e39ef Fixed crash occuring when a vertex buffer is mapped in invalid OpenGL context. 2016-05-03 16:16:59 +02:00
Maciej Suminski a62d2b5412 Bigger net labels (GAL). 2016-05-03 15:15:08 +02:00
Maciej Suminski 8d952f35c6 Fixed text vertical alignment for bitmap font (OpenGL). 2016-05-03 11:58:48 +02:00
Maciej Suminski 2f874097ae Fixed a crash in pcbnew (GAL). 2016-05-02 16:15:26 +02:00
Maciej Suminski 09d2d5367a Store grid settings for GAL. 2016-05-02 16:15:25 +02:00
Maciej Suminski 58ed0c8cce Improved grid drawing routine (OpenGL). 2016-05-02 16:15:24 +02:00
Maciej Suminski 2f09e0ee40 Alternative version of CACHED_CONTAINER::defragmentResize() Certain GPUs do not support glCopyBufferSubData(), therefore there is an alternative version working with good, old memcpy(). 2016-05-02 16:15:24 +02:00
Maciej Suminski d23a508aa3 Fixed errors introduced to STROKE_FONT class. 2016-05-02 16:15:23 +02:00
Maciej Suminski 3e3ecccb2b A few more fixes related to the previous commit. 2016-05-02 16:15:23 +02:00
Maciej Suminski 6e881f51fd Changed bound buffers to improve compatibility (OpenGL GAL). 2016-05-02 16:15:23 +02:00
Maciej Suminski 0c4b6dabd3 Increased interglyph spacing to avoid artifacts when mipmapping is enabled. 2016-05-02 16:14:26 +02:00
Maciej Suminski fff3abc9a0 Support for overbars in bitmap fonts (OpenGL GAL). 2016-05-02 16:12:18 +02:00
Maciej Suminski c506d2b16c Set OpenGL context before freeing video resources. 2016-05-02 16:12:18 +02:00
Maciej Suminski 59fe8df269 Split bitmap text drawing routine into smaller functions (GAL). 2016-05-02 16:12:18 +02:00
Maciej Suminski a3a9641ae2 Disable invalidating buffer on CACHED_CONTAINER::Clear(). OpenGL context is not available when the method is called, so it does not work. 2016-05-02 16:12:18 +02:00
Maciej Suminski 031fbb4630 Avoid too frequent message panel updates. 2016-05-02 16:12:17 +02:00
Maciej Suminski 5a8adcdf52 Improved testing/profiling code for CACHED_CONTAINER. Switched from wxLogDebug to wxLogTrace. Adjusted CACHED_CONTAINER_TEST levels required for certain tests. Added a test to check used space in the container. 2016-05-02 16:12:17 +02:00
Maciej Suminski 54f3105cfb More changes to CACHED_CONTAINER. Removed m_itemSize field (error-prone, as it had to be synchronized with m_item->GetSize()) Fixed a bug in reallocate() method, changed a bit it is behaviour. VERTEX_ITEM is not stored in the item set if its size is 0. 2016-05-02 16:12:17 +02:00
Maciej Suminski deb578eadd Recognize a special case of completely filled/defragmented container when resizing. 2016-05-02 16:12:17 +02:00
Maciej Suminski a9c3a1730b Free chunks in CACHED_CONTAINER only if they are really not needed. 2016-05-02 16:12:16 +02:00
Maciej Suminski 702be4903f Vertices are stored in GPU memory (OpenGL GAL). 2016-05-02 16:12:16 +02:00
Maciej Suminski 01912aaabd Minor refactoring in CACHED_CONTAINER. 2016-05-02 16:12:16 +02:00
Maciej Suminski b32fdd97d9 Changed shading model to flat. 2016-05-02 16:12:15 +02:00
Maciej Suminski 52c698ab11 Fixed an included header (OpenGL GAL). 2016-05-02 16:12:14 +02:00
Maciej Suminski e2c8e07344 Enabled mipmapping for bitmap fonts. 2016-05-02 16:12:14 +02:00
Maciej Suminski 53ef29802f Switched bitmap font to higher resolution. 2016-05-02 16:11:39 +02:00
Maciej Suminski 05a30b7591 Do not draw anything if vertex containers are empty. 2016-05-02 16:08:50 +02:00
Maciej Suminski 928d4e0404 SwapBuffers() contain an implicit glFlush() 2016-05-02 16:08:50 +02:00
Maciej Suminski bda3011519 Initial support for bitmap fonts (OpenGL GAL). 2016-05-02 16:04:45 +02:00
Maciej Suminski 431e343201 Switch to direct rendering before clearing the screen (OpenGL GAL). 2016-05-02 15:56:19 +02:00
Maciej Suminski 5ba84dda0a OpenGL capabilities test is run only once. 2016-05-02 15:56:19 +02:00
Maciej Suminski 795fd28742 Set Stroke/Fill settings for stroke font in its Draw() function. 2016-05-02 15:56:17 +02:00
Maciej Suminski 36dd6eb6b3 GAL profiling output is enabled with WXTRACE env variable. 2016-05-02 15:56:17 +02:00
Maciej Suminski c0465e5519 Instance counter for OPENGL_GAL to avoid double freeing. 2016-05-02 15:56:16 +02:00
Maciej Suminski dbff9ad786 Improved error checking in GPU_MANAGER. 2016-05-02 15:56:16 +02:00
Maciej Suminski 4cca3bc368 Minor OPENGL_COMPOSITOR refactoring. 2016-05-02 15:56:16 +02:00
Maciej Suminski 1927f3a787 Unified way of checking OpenGL errors. 2016-05-02 15:56:14 +02:00
Maciej Suminski 2a276550eb Fixed SHADER::AddParameter() function. 2016-05-02 15:56:13 +02:00
Maciej Suminski b143ce6b0f Moved text settings from STROKE_FONT to GAL. 2016-05-02 15:56:12 +02:00
Maciej Suminski da312db7a4 Fixed a wxWidgets assertion. Newer wxWidgets (3.1) display a message saying that horizontal alignment flags are ignored with wxEXPAND. 2016-05-02 15:56:12 +02:00
Maciej Suminski f968556f9a Smoother autopanning. 2016-05-02 15:56:11 +02:00
Maciej Suminski 113e75c5c5 VERTEX_MANAGER functions return false in case of failure. 2016-05-02 15:56:11 +02:00
Maciej Suminski 4262915b38 Code formatting. 2016-05-02 15:56:10 +02:00
Maciej Suminski 0cfa360390 Added VERTEX_MANAGER::Reserve() function. 2016-05-02 15:56:10 +02:00
Matthew Petroff db54f3e7a7 Correct multiple UI spelling errors 2016-05-02 10:01:43 -04:00
jean-pierre charras f532057d05 Fix incompatibility between basic_gal (which used angles in degrees in rotation) and other gal layers (which used radians in rotation). Rotation angles are now in radians.
Fix erroneous optimization in VECTOR2<T>::Rotate (which was made for angles in degrees): Angles are in radians, and only 0 rd rotation is skipped ( case very frequent, especially in eeschema)
2016-04-29 11:37:33 +02:00
jean-pierre charras b92ad6f5a8 Add CSV file format in pcbnew position files (and cleanup code) 2016-04-26 14:16:16 +02:00
jean-pierre charras c1f0ab91a2 Code cleaning and coding style fix. 2016-04-23 17:44:17 +02:00
jean-pierre charras 53c031257d Fix a few shadowed local vars, and coding style issues. 2016-04-22 12:44:08 +02:00
jean-pierre charras 67982a4851 stroke font: fine adjust of text horizontal position. edat_text: fix an issue in SetOrientation: the rotation angle is now constrained between -360 and +360 degrees.
It was previously not the case, and rotated texts outside this interval created issues in dialog_pcb_text_properties which have now validators.
2016-04-19 20:35:47 +02:00
jean-pierre charras fde2cfee27 Minor changes: remove a few local shadowed local variables detected using " -Wshadow" gcc compil option ( No bug, just a better code readability ) and fix minor coding style issues. 2016-04-18 20:15:44 +02:00
Robert Antoni Buj Genlonch 8d8b357f45 Add Catalan translator to about dialog. 2016-04-18 11:26:56 -04:00
Wayne Stambaugh 46ff5a2580 Pcbnew: remove dead macro code. 2016-04-18 11:03:59 -04:00
Robert Antoni Buj Gelonch e0a1bcac57 Add Catalan translator 2016-04-14 22:27:03 +02:00
jean-pierre charras 829fa97f3c Gerber files: ensure the "level polarity dark" is set in each file (this is the default, but ensuring that is better and can avoid issues when panneling files) 2016-04-14 09:32:35 +02:00
jean-pierre charras 95962cd2ba Very minor changes: minor coding style fixes, and remove a few local shadowed variables (mainly local variables having the same name in the same function) detected using " -Wshadow" gcc compil option ( No bug, just a better code readability ) 2016-04-12 17:50:42 +02:00
Wayne Stambaugh f239aee1ad Fix quasi-modal dialog mode in DIALOG_SHIM class.
* Add event handler to check all button clicks for default command event
  IDs and handle them appropriately by either calling EndQuasiModal() or
  passing the event up the event handler chain to allow the default dialog
  handlers to perform their magic.
* Add event handler to handle the close window event properly.
* Add scope brackets so the wxBusyCursor will stop being displayed when
  the footprint library loading is complete in CvPcb.
2016-04-11 19:39:43 -04:00
Wayne Stambaugh 5504c17787 CvPcb: remove footprint library load failure limit. (fixes lp:1553756)
* Remove the artificial footprint library read error limit to prevent
  potentially readable libraries from being loaded after the error limit
  is reached.
* Change error message dialog to an HTML dialog so that potentially large
  error messages can be displayed with scrolling and the ability to copy
  and paste the error message for bug reporting purposes.
* Add busy cursor when loading the footprint libraries so the user has some
  idea that something is happening while the footprint libraries are being
  loaded.
2016-04-08 12:45:11 -04:00
jean-pierre charras c146cc09eb Kicad: fix a crash when changing a project, if pcbnew was run and "Update PCB from Schematic" was run and Schematic editor never opened.
(In this case the schematic frame exists, but some members are not initialized as expected, and a crash happens when calling the schematic editor dtor)
Minor other fix: avoid multiple very similar strings to translate in 3d_filename_resolver.cpp
2016-04-08 14:11:05 +02:00
jean-pierre charras 4a838fb8c3 Pcbnew: Add rounded rect pad shape. 2016-04-06 20:15:49 +02:00
Maciej Suminski 99e7e8c983 Disabled CACHED_CONTAINER freeing memory on GAL<->legacy switch. 2016-04-04 13:54:55 +02:00
jean-pierre charras 18cb83f5c7 OpenGL mode: Disable frequent (and not very usefull) memory deallocation/reallocation to avoid "out of memory" issue due to heap fragmentation (noticeable only with large boards).
Note: there is still this issue when switching back legacy mode  and to Opengl mode because the heap is still freed and reallocated.
2016-04-04 12:41:48 +02:00
Wayne Stambaugh 76d099b337 Eeschema: fix illegal field characters causing corrupt schematic files on Linux. (fixes lp:1529358)
* Refactor edit one field dialogs to use validators and transfer data to and
  from window functions.
* Add code to DIALOG_SHIM to handle validation and transfer functions since
  the base dialog class code is not called by EndQuasiModal().
* Add custom validator class for filtering field text control characters.
* Add new field validator to edit schematic component dialog field text
  control.
* Add new field validator to edit fields in library editor dialog field
  text control.
* Make a few LIB_PART member functions const.
2016-04-02 08:25:44 -04:00
Chris Pavlina fe53ec8c23 hotkeys: add defaults command to right-click menu
The new (eeschema, so far) hotkeys editor uses the right-click menu for the
reset command, so the reset-to-default function that was added in 6652
(git:0cd7476) was not accessible from eeschema.
2016-03-30 14:51:47 -04:00
jean-pierre charras 713e8d93f3 About dialog: small changes. EDA_HOTKEY class: better ctor. 2016-03-29 19:51:53 +02:00
unknown 0cd747668f Hotkeys Editor has now a "reset to default" button 2016-03-29 18:35:24 +02:00
jean-pierre charras 2efd31ef03 Fix a stupid bug I introduced in rev 6649 (eeschema: incorrect position of free texts in components) 2016-03-26 10:08:09 +01:00
jean-pierre charras a526984d9e Kicad about dialog: update links. remove dead link. 2016-03-25 18:05:25 +01:00
jean-pierre charras 426f7ebb2e Rework on class EDA_TEXT and related classes and draw text functions. More work: remove useless or duplicate code (from legacy graphic text plot functions). Move basic_gal code to separate files. 2016-03-25 09:33:45 +01:00
jean-pierre charras 92ce9c1193 Rework on class EDA_TEXT and related classes and draw text functions. More work: remove useless or duplicate code (from legacy graphic text plot functions). Move basic_gal code to separate files. 2016-03-25 09:26:11 +01:00
jean-pierre charras bc699c8d8f Rework on class EDA_TEXT and related classes and draw functions. More work. Eechema: in rotate texts: redraw the full screen to avoid garbage on screen. 2016-03-23 13:16:27 +01:00
jean-pierre charras 30d72045e7 Rework on class EDA_TEXT and related classes and draw functions (Note: this is a work in progress):
* remove duplicate code between  draw functions and STROKE_FONT used in GAL. Use only  STROKE_FONT methods in draw, plot and test DRC function for texts. It remove slightly different shapes between GAL and other calculations.
* fix incorrect bounding box for texts with overbar. Especially noticeable for texts with overbar inside a copper zone in Pcbnew.
* fix a few minor other bugs related to graphic texts.
2016-03-23 08:41:47 +01:00
Chris Pavlina bb9f1b00cd Fix graphics rendering on RTL systems (lp:1559545)
wx mirrors graphics by default on RTL systems; it is necessary to individually
set graphics canvases to LTR mode to avoid this.
2016-03-22 14:53:50 -04:00
jean-pierre charras aea1f1be6d page layout reader: fix a minor issue in parseGraphic method. Update a old (incorrect) .kicad_wks file in demo. page_layout_writer.cpp: remove a few useless spaces in output files. 2016-03-22 10:46:18 +01:00
unknown b70f3c283d fix page_layout_default_description (missing parenthesis before the keyword "end" in a few lines) 2016-03-22 10:42:06 +01:00
jean-pierre charras 99d18faca9 Change the way main editor frames are managed by Kicad: before this change, they had the Kicad manager frame as parent frame, and it creates a few issues:
- When the Kicad manager is iconized, all other child frames are iconized (normal wxWidgets behavior)
- For viewer frames in modal mode, there is a more annoying issue: they have the wxFLOAT_ON_PARENT frame style on unix, and wxSTAY_ON_TOP on Windows.
wxFLOAT_ON_PARENT frame style is incorrect (although on most WM it works) because the parent frame (Kicad manager Frame) is not the caller. It is usually a main editor frame.
It does not work on Windows (wx STAY_ON_TOP is used).
* Now each editor frame has a null parent.
Therefore iconizing the Kicad manager frame does not iconize other frames.
* Viewer frames have null parent in normal mode and the caller parent in modal mode (therefore wxFLOAT_ON_PARENT frame style is always and correctly used)
* References to opened/closed main frames are no more managed by the (complicated) kicad code. Instead of, a non critical and more easy to understand code just uses FindWindowByName to know if a main window exists or not.

These changes do not fix all issues about Kicad frames brought to the foreground or the background, but it fixes a few issues, and AFAIK do not add other issues.
2016-03-21 17:36:06 +01:00
jean-pierre charras 30f113c2de Remove a change which was committed by accident in rev 6632 2016-03-20 19:49:04 +01:00
jean-pierre charras 6e93672760 Icons: remove not used icons. 2016-03-20 18:52:15 +01:00
dwilches 1c19699a7c Fix Preferred Editor dialog (lp: 1558353)
The functions involved in the problem were PGM_BASE::GetEditorName and
EDA_BASE_FRAME::OnSelectPreferredEditor:

1) OnSelectPreferredEditor showed a dialog to allow the user selecting the
editor, but before that called GetEditorName to get the name of the current
editor (to show as a default in the choose file dialog).

2) The problem was when there was no editor, GetEditorName showed its own
dialog.

3) So the user was seeing first the dialog from (2) and then the dialog from
(1).

4) As GetEditorName is used in many other places the solution I did was to add
to it an optional parameter that tells it what to do if no editor is set. To
avoid modifying other code that relies on the current behaviour, this parameter
has a default value that causes to show the dialog. But now when
OnSelectPreferredEditor calls it, it passes the parameter that causes it to
return an empty string if no editor was set.

5) Also, I found a second bug while doing it which allowed in the first dialog
to select an unexistent file (the dialog was missing the wxFD_FILE_MUST_EXIST
flag).

6) Lastly, to avoid having duplicated code (the one that showed the same dialog
and that configured the wildcard was in two methods) I created a single
function that now both functions call: PGM_BASE::AskUserForPreferredEditor.
This way we also will have consistency in the behaviour of both dialogs and
there is a single place where it needs to be modified.
2016-03-17 16:59:35 -04:00
Simon Wells 145cd47d5c Move copy version information code to about dialog. 2016-03-11 11:40:24 -05:00
jean-pierre charras 99e81aeb9c Fix incorrect (too small) bounding box EDA_TEXT, noticeable when chars like j or { are used in zone fill functions.
I tried to merge some constants used both in legacy mode and gal mode (which were, before this patch, separate constants).
There is still a serious work to avoid different calculation code for the same text in draw and plot functions.
Work in progress to merge these calculation functions.
2016-03-11 13:08:34 +01:00
Chris Pavlina b9be9a4f57 Common: delete accidental dead branch (Coverity)
CID 135586 in widget_hotkey_list: logically dead code

This code was added accidentally; it is both dead and unnecessary, and so was
removed.
2016-03-05 23:13:25 -05:00
jean-pierre charras 8dc0a33cc7 Remove a old useless font file (the Cyrillic fonte is, since a long time, in the current font file) 2016-03-03 18:51:38 +01:00
Bernhard Stegmaier 59f6a720f0 Fix touchpad scrolling on OSX. 2016-03-01 15:19:00 -05:00
jean-pierre charras 624c508dda Fix an issue relative to the env vars initializations on Linux: they are not initialized if the value contains any non ASCII7 char, and if the locale is not set.
The locale is now set before reading the env vars configuration.
2016-03-01 14:37:15 +01:00
Tomasz Wlostowski 0fa71d8d8f more accurate pushout force calculation for circle-segment collisions 2016-03-01 14:26:08 +01:00
Bernhard Stegmaier f8abe9c191 Add support for optional touchpad panning. 2016-02-24 14:53:02 -05:00
Wayne Stambaugh bedf0b6aec Remove incorrect comment regarding wxWidgets bug report from class_bitmap_base.cpp. 2016-02-23 19:31:34 -05:00
Nick Winters 8cb1f39ed5 OSX: fix bug caused by wxBitmap drawing 0 width or heigth bitmap. (fixes lp:1529159) 2016-02-22 16:23:17 -05:00
Bernhard Stegmaier 5d25b4ef90 Disable FPS limiter for OSX (GAL). 2016-02-16 09:05:41 +01:00
jean-pierre charras d902c2716a Add Slovak entry in language menu. 2016-02-11 20:12:37 +01:00
jean-pierre charras 2284228c35 HPGL plot dialog: remove no more in use Pen Overlap parameter. Fix incorrect polygon fill by setting the hpgl pen thickness in hpgl file. Add filled circle (previously, a circle was never filled) 2016-02-11 13:14:46 +01:00
jean-pierre charras 5658ed9c8e Prepare rounded rect and custom shaped pads: add plot functions. It fixes also a pcbnew crash in HPGL mode when plotting trapezoidal pads. 2016-02-10 17:02:40 +01:00
jean-pierre charras 050bdbc772 Pcbnew: minor changes:
* Dialog copper zones: Always enable thermal shape settings, because even with no thermal, some pads can use thermal option in local pad settings.
* GAL mode: shows page limits in gray color, like in legacy mode, and according to comments in sources.
2016-02-09 09:23:24 +01:00
Chris Pavlina 39ad4ef7fc Hotkey editor: dynamically resize columns
This was done in OnSize(), but was not triggered when a hotkey was edited.
2016-01-25 11:17:52 -05:00
Chris Pavlina 76fb8ce8f9 Hotkey editor: Fix GTK assertion
Tried to set negative width when dialog sized too small
2016-01-25 11:17:43 -05:00
Bernhard Stegmaier 3e2b4244f9 OSX: add support for wxMagnifyEvent on OSX builds using wxWidgets 3.1.0 or greater. 2016-01-24 19:18:29 -05:00
jean-pierre charras 731a87db25 Fix Bug #1536427 ("User (Custom)" size selection in"Page Settings" issue in non English languages).
Remove also a no more in use code
2016-01-21 11:15:13 +01:00
Maciej Suminski 4951285a67 GAL::DrawPolygon() and GAL::DrawPolyline() variants that work with VECTOR2D array. 2016-01-20 15:16:39 +01:00
Chris Pavlina c490e7dd06 Fix typing problems with GR_KB_* constants 2016-01-20 07:11:17 -05:00
Simon Wells edc47c3f8e Clean up includes in confirm.cpp, confirm.h 2016-01-18 00:17:56 -05:00
Simon Richter da9ca2def2 Avoid cast from const_iterator to iterator
The standard library requires iterators passed to functions that modify the
container to be mutable iterators, but GCC's implementation accepts
const_iterator in some places where these are only used to mark a place,
but the actual modification happens through a different parameter.

As this breaks implementations that use the passed iterator to modify the
container (e.g. because they use a different data organization), this is
not portable; because we already have a non-const reference to the
container anyway, this is trivially fixed as well.
2016-01-17 12:31:00 -05:00
Simon Richter ff4febc7a8 Clarify atan2 overloads
In the C++ standard, this function is only defined for floating point
types, and integers cannot be implicitly converted. Using explicit
conversions avoids a GCC specific extension to the standard library.
2016-01-17 10:59:24 -05:00
Mark Roszko 05ee63fe39 Replace dangerous cast of pointer->long 2016-01-16 22:56:58 -05:00
jean-pierre charras 6155cba077 kicad_curl.cpp: fix a compil warning on Windows (regression)
pcb_calculator: fix incorrect formulas shown in attenuators panel. Png files are no more used, and formulas are now html doc files.
2016-01-16 15:27:42 +01:00
Chris Pavlina 3b4e6dc1fa Fix wx font bug
Labels don't size correctly with large font
2016-01-15 21:07:42 -05:00
Chris Pavlina 950d2458c0 Fix label sizing in hotkey query dialog 2016-01-15 21:07:35 -05:00
Chris Pavlina 6e52c228bc Add comment and tidy up 2016-01-15 21:07:28 -05:00
Chris Pavlina 165f42daaf Continue fixing silly Windows-related bugs 2016-01-15 21:07:19 -05:00
Chris Pavlina 4391f99a25 Clean up EVT_CHAR_HOOK and fix a bug on Linux
Forgot aEvent.Skip()
2016-01-15 21:07:12 -05:00
Chris Pavlina 95988802f7 Fix special keys on Windows 2016-01-15 21:07:06 -05:00
Chris Pavlina f574620d07 Fix special hotkeys on Windows 2016-01-15 21:06:59 -05:00
Chris Pavlina 14008321fe Dynamically size horizontal column if necessary. 2016-01-15 21:06:51 -05:00
Chris Pavlina 80fae7161e Coding style fixes 2016-01-15 21:06:25 -05:00
Chris Pavlina b2a5307e4b Do not reset the selection after changing hotkey 2016-01-15 21:06:07 -05:00
Chris Pavlina 06add0d130 Add context menu 2016-01-15 20:58:53 -05:00