Commit Graph

866 Commits

Author SHA1 Message Date
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 1fbb84fd98 Move call of SetSizeHints in dialogs in a wxInitDialogEvent event, because some widgets sizes are not fully initialized before this event.
It is especially true in some Window Managers like KDE, but can be true in any WM, when initializations are mage by TransferDataToWindow() method.
2016-07-02 14:44:36 +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 83504c2b29 Pcbnew: Rework on print dialogs. 2016-06-19 20:29:13 +02:00
jean-pierre charras 68f0503586 Fix Pcbnew bug: print dialog: layers not listed in dialog (Linux specific) 2016-06-18 17:47:05 +02:00
jean-pierre charras 0862ac28d0 Dialog DRC: fix a minor bug created in rev 6936: the report file was always created, regardless the option selected in the check box.
Enhancement: the browse file dialog nows open the project folder by default.
2016-06-17 08:24:54 +02:00
jean-pierre charras 3f2b15711c Fix bug: DRC report to File crashes Pcbnew, if the file cannot be created (for instance if the CWD is not writable, or if the path does not exist)
Fix also an other issue: if the file path is not entered, the file is now created in the current project directory.
2016-06-15 19:00:30 +02:00
Maciej Suminski 7ff3dd0807 Make sure GL canvas is visible upon destruction in Module properties dialogs. 2016-06-14 12:08:35 +02:00
Chris Pavlina 5285962775 Remove option to not show footprint ratsnest when moving
This option only exists in legacy, with no real plan to port it to GAL. Nobody
seems to use this; there isn't really much of a point to it. Bye!
2016-06-11 22:34:07 -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
jean-pierre charras f311230874 Gerbview: when running gerbview from a command line, if a filename is given, and if it is a .drl file, it is loaded as drill file (instead of a gerber file, which generate an error message).
Code refactor: remove useless class members,  and move read gerber file and read excellon file from gerbview frame to the corresponding classes
2016-06-05 14:26:39 +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 185dc2bbdf fix an incorrect filename (incorrect case) which created compil issue on Linux. 2016-06-03 08:49:55 +02:00
jean-pierre charras 93e61e7a2e Minors fixes: dialog_print_using_printer.cpp: fix a Coverity warning and very minor coding style issue. xsl scripts: add bom2grouped_csv.xsl (from a contributor) and fix minor issues. 2016-06-03 08:32:24 +02:00
Simon Wells 4b5a4c0d36 Display correct page count in print dialog 2016-05-30 11:44:49 -04:00
Simon Wells 457b021101 Fix bug: printed duplicate pages when Single Page selected
https://bugs.launchpad.net/kicad/+bug/1523065
2016-05-30 11:25:40 -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 e2d4118470 Eechema, Component editor: Fix a bug in Pin properties dialog: a parameter used to draw the pin in preview canvas was incorrect, due to code change in draw pin. 2016-05-19 18:38:36 +02:00
Chris Pavlina 84d3fbfd68 Remove MaxUndoItems, make devel option DevelMaxUndoItems
Begin documenting configuration keys in Doxygen
2016-05-12 12:51:32 -04:00
jean-pierre charras 0bd287b6d9 Pcbnew: Fix a very minor bug ( The "Move exactly..." sometimes truncates the saved parameter floating point values during a session) 2016-05-11 12:16:07 +02: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 445db7da58 Fix uninitialized fields
Coverity: CIDs 102698, 147347, 147349, 147350
2016-05-10 22:36:23 -04:00
Chris Pavlina ba17a54c08 Remove "Dump zone geometry to files when filling"
The code to perform the dump has not been removed, but the GUI option and
global flag (ugh) have been.
2016-05-10 17:37:51 -04:00
Chris Pavlina e9a9a269b4 pcbnew legacy: remove option to hide via drill
Via drills are now shown in all cases, matching GAL behavior, and the option no
longer exists in the preferences dialog.
2016-05-10 16:47:37 -04: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 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
Maciej Suminski ed0b95d710 Added an option change grid style. Refactored DIALOG_SET_GRID. GAL can draw grid using lines or dots now. DIALOG_SET_GRID was refactored to use Transfer{From,To}Window() methods. 2016-05-02 16:15:24 +02:00
Matthew Petroff db54f3e7a7 Correct multiple UI spelling errors 2016-05-02 10:01:43 -04:00
jean-pierre charras e46f706d4b Add Set/GetOrientationDegrees and GetOrientationRadians for texts, pads and footprints to avoid internal units to usual angle units conversion in code (and avoid mistakes).
It should help if (or when) the internal angle unit used in kicad will be changed from 0.1 degree (a relic of code written for PCs without fpu) to degree ( a more natural unit).
2016-05-02 12:49:14 +02:00
jean-pierre charras 8c76b92fa9 Fix a few shadowed local vars which make the code not so easy to analyze. 2016-04-29 13:10:31 +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 d7f1400e44 Make strings only used in debug mode not translatable. 2016-04-21 09:19: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
Cirilo Bernardo 6120472d60 3D file name resolver improvements.
* Paths defined via pcbnew->Preferences->Configure Paths are now included in
  the 3D file browser's drop-down list except for KICAD_PTEMPLATES, KIGITHUB,
  KISYSMOD, any paths resembling a URL, and any non-existent paths. When an
  absolute path is shortened using one of these path aliases, let's say
  'KISYS3DMOD' then the name appears in the pcb file as "${KISYS3DMOD}/blah.wrl".
  If a user defines and actual environment variable with the same name, then
  that user defined variable will have precedence over the internally defined
  variable.

* Paths relative to the current project directory are no longer represented
  as "some/path/to/file.wrl".  For compatibility with previous KiCad versions
  it shall always be stored as ${KIPRJMOD}/some/path/to/file.wrl.

* Various restrictions on alias path values have been removed since the
  imposed restrictions could result in corrupted user data as aliases are
  silently dropped.

* Overall the patch should improve back-compatibility by providing a ${ENV_VAR}
  mechanism for supporting different model root directories and ensuring that
  paths relative to KIPRJMOD are expressed in a way that is compatible with
  earlier KiCad versions. This allows users more flexibility and the ability
  to work in a way that ensures 3D model files can be correctly resolved in
  earlier versions of KiCad. Users who do not care about back-compatibility
  may prefer to use the newer alias system.
2016-04-17 18:35:32 -04:00
Chris Pavlina ff3d22dcd9 Remove DIALOG_ORIENT_FOOTPRINTS 2016-04-17 10:11:14 -04:00
jean-pierre charras bcd345c29f Fix issues in dialog drc: because it is not modal, DRC parameters and unit selection can be modified outside the dialog, still opened. Now, the new parameters are taken in account.
Fixa also a corner case which crashes Pcbnew: if the dialog is opened, and the board was  changed (reloaded, cleared),  pcbnew crashed because many pointers stored in dialog  become invalid. Now the dialog is just closed.
2016-04-15 20:15:22 +02:00
Chris Pavlina 36b53a50e9 Fix signedness in a couple comparisons (warning suppression) 2016-04-12 19:18:42 -04:00
Chris Pavlina 48573712e8 Exterminate another 0.1deg field 2016-04-12 19:18:33 -04: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
Chris Pavlina 9e3fd5b762 Nuke 0.1deg units in DIALOG_GRAPHIC_ITEM_PROPERTIES 2016-04-11 10:27:32 -04:00
Chris Pavlina 4d77388216 Clean up wxValidator window association
wxValidator::SetWindow was used too many times due to me being a dunderhead who
can't read the docs.
2016-04-10 18:28:06 -04:00
Chris Pavlina 8325d6fdf0 Eliminate 0.1deg units in DIALOG_PAD_PROPERTIES 2016-04-10 18:14:28 -04:00
Chris Pavlina 0a6583f902 Eliminate 0.1deg units in DIALOG_MODULE_BOARD_EDITOR 2016-04-10 08:59:23 -04:00