Commit Graph

148 Commits

Author SHA1 Message Date
Jeff Young 30a4d3d2de Coverity fixes. 2022-09-20 00:19:15 +01:00
lulu731 0180bcf90a ADDED: Implement Drag and Drop
dropping files to Kicad manager :
  *.kicad_pro, *.pro -> open project;
  gerber and job files -> open in Gerbview editor;
  Eagle and Cadstar files -> open project.
dropping file to schematic editor -> append schematic;
dropping library file to Symbol editor -> add library;
dropping board file to PCB editor -> append board;
dropping library or footprint file to Footprint editor -> add library or import footprint;
dropping ZIP file or gerber files to Gerbview editor -> open files;
dropping sheet file to Drawing Sheet editor -> open sheet.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/11638
2022-09-14 22:28:09 +00:00
Jeff Young 4e3109a633 Wide string decls for gerbview. 2022-02-05 22:34:45 +00:00
Mike Williams 6ddd5ec37f Gerbview: Add menu item to open files with autodetection
Needs an icon at some point
2022-01-24 08:40:49 -05:00
Mike Williams 8692014691 Gerbview: consolidate some dialog code
Preparing also for a third usage where we autodetect the file type
2022-01-24 08:40:49 -05:00
Mike Williams db407a1c0b Gerbview: clean up loading files to prepare for more autodetection 2022-01-24 08:40:49 -05:00
Mike Williams eee20f9f67 Gerbview: reduce redundant file loading code 2022-01-24 08:40:49 -05:00
Mike Williams 4140ab118e Gerbview: remove extra linebreaks from errors messages 2022-01-24 08:40:49 -05:00
Mike Williams 2612b94519 Gerbview: always search for the first available layer 2022-01-24 08:40:49 -05:00
Mike Williams 9a0d4f5ba4 Gerbview: don't erase current layer before loading files
Since we now load into the next available layer, don't erase our current
layer.
2022-01-24 08:40:49 -05:00
Mike Williams 5767a08008 Gerbview: select first layer of opened archive 2022-01-24 08:40:49 -05:00
Mike Williams 2dd6b98b89 Gerbview: Load files into new layers 2022-01-24 08:40:49 -05:00
Mike Williams 3338745637 Gerbview: auto sort zip files based on X2 or extensions 2022-01-24 08:40:49 -05:00
Mike Williams da2e7e158b Gerbview: Attempt to parse unknown files as gerber/drill
Test parsing function transmogrified from gerbv 2.7.0. gEDA suite is GPL
2+ so should be license compatible with our GPL3.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/1848
2022-01-24 08:40:49 -05:00
Mike Williams 21a8dd6302 Gerbview: Better file extension association when opening zips
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/7855
2022-01-24 08:40:49 -05:00
Jeff Young 3aae3c6f65 Dark mode for a bunch of HTML dialogs.
WX_HTML_REPORT_BOX
WX_HTML_REPORT_PANEL
HTML_MESSAGEBOX
DIALOG_DISPLAY_HTML_TEXT

Fixes https://gitlab.com/kicad/code/kicad/issues/9157

Fixes https://gitlab.com/kicad/code/kicad/issues/9156
2021-09-14 21:23:57 +01:00
Seth Hillbrand d8bc7f1bd4 Fix Gerbview extension display 2021-09-09 10:33:52 -07:00
Mike Williams 30987cebfe Gerbview: fix cairo negative items and implement real differential mode
Layers with negative objects need to be drawn in a subsurface before
copying so they don't _CLEAR the draw items below them when a negative
object is drawn.

Differential layers are basically the same thing only they use a
different copying operation onto the layers below.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/1863
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4495
2021-08-31 12:43:53 +00:00
Seth Hillbrand db5ce824af Use wildcard routine for extension matching
Move STEP export dialog wildcard to extension matching
2021-08-20 17:24:05 -07:00
Seth Hillbrand 4cd9278041 Remove most wxFilepicker wildcards from translations
This prevents translation errors from preventing user actions such as
opening the correct file
2021-08-20 12:56:47 -07:00
Jeff Young 41619ebbe2 Decouple PROGRESS_REPORTER interface from implementations. 2021-08-14 21:05:49 +01:00
Pradeepa Senanayake c006a4f26e Fixed style warnings 2021-07-28 17:55:45 +00:00
Pradeepa Senanayake 109e40c3a6 Ensure auto zoom is enabled when it's the first file 2021-07-28 17:55:45 +00:00
Pradeepa Senanayake 8f4ff1e954 Disabled zoom-to-fit when loading gerb files 2021-07-28 17:55:45 +00:00
Pradeepa Senanayake 9b7d056563 Moved auto zoom outside of the function which loads the gerbers and drill files
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8849
2021-07-28 17:55:45 +00:00
Jeff Young 5c21f93803 Consistency in progress and error messages. 2021-06-26 13:23:43 +01:00
Jeff Young 1722bc03b0 Consistent terminology and punctuation. 2021-06-17 00:05:17 +01:00
Marek Roszko f9769dba13 Kick wx.h out of gerbview 2021-06-07 18:38:51 -04:00
Marek Roszko 850a22c3ae Try/catch gerber file loading in attempt to catch oom
Potentially help with #7444
2021-05-01 12:46:18 -04:00
Jeff Young 34d3218f73 Translation cleanup.
Fixes https://gitlab.com/kicad/code/kicad/issues/6078
2021-02-21 23:13:13 +00:00
Marek Roszko 4b38bada76 Move the gerbview widgets to their own folder 2020-11-16 07:41:22 -05:00
Marek Roszko e49ac45b84 HTML_MESSAGE_BOX is a dialog 2020-10-25 20:01:12 -04:00
Marek Roszko a1c75748a0 Remove GetChars(), a wxWidgets 2.9 compatibility hack 2020-10-15 20:53:25 -04:00
Ian McInerney 4215917834 gerbview: Move more items to actions 2020-10-09 01:55:31 +01:00
jean-pierre charras 04aa5519d0 Gerbview: code cleanup. Remove many include, now useless. 2020-09-30 12:56:55 +02:00
jean-pierre charras ef0ae8a8ee Gerbview: show a message instead of an error when trying to open a job file as plot file.
Fixes #4844
https://gitlab.com/kicad/code/kicad/issues/4844
2020-07-10 14:20:35 +02:00
jean-pierre charras 54caebb04a Fix translation issues and a typo 2020-05-06 20:41:29 +02:00
Jeff Young ed3e366715 Actionize Gerber file commands.
Fixes https://gitlab.com/kicad/code/kicad/issues/2408
2020-05-03 23:02:24 +01:00
jean-pierre charras b7cd0c54c2 Fix compil issues, especially on Windows:
Replace SEVERITY_ERROR by RPT_SEVERITY_ERROR to avoid collision with a system definition.
Replace other SEVERITY_XXX by RPT_SEVERITY_XX for consistency.
Fix compil warnings and some other compil issues.
2020-03-04 10:48:18 +01:00
Jeff Young 85c2e0d23a Add user-defined severities, exclusions and colors to DRC markers.
Exclusions are currently persisted in the project file.

Fixes https://gitlab.com/kicad/code/kicad/issues/1989
2020-03-04 00:39:28 +00:00
Ian McInerney 879a8f4efb Rework the file history menus to not need references to the file history
Keeping a pointer to the actual file history inside a special
file history menu led to many cases of use after free crashes,
so instead rework the actual file history to add the menu
items.

Fixes https://gitlab.com/kicad/code/kicad/issues/3741
2020-02-25 16:18:10 +00:00
Jon Evans 0748ec16ed Fix assertions in progress bar on MSW64 2020-01-04 10:46:49 -05:00
John Beard 44a6a61ff9 Gerbview: fix formatting assert
In GERBVIEW_FRAME::loadListOfGerberAndDrillFiles, the variables
ii and aFilenameList.GetCount() are unsigned and size_t, respectively.

This means the format string must be %u and %lu, respectively.
2019-11-24 12:27:23 +08:00
jean-pierre charras 4f73530c4a Gerbview: better progress reporter info when loading more than one file 2019-08-25 20:32:40 +02:00
Jeff Young 8f84c3ec4f Grid rid of GetCanvas/GetGalCanvas distinction now that there's only gal. 2019-06-13 19:58:37 +01:00
Jeff Young c2662b0e11 Retire EDA_DRAW_PANEL and legacy_wx/EDA_DRAW_FRAME. 2019-05-31 21:55:30 +01:00
Jeff Young d2daab808c Remove some legacy cursor handling stuff. 2019-05-31 21:54:22 +01:00
Jeff Young b7c12b238f Increase GervView layers to 51.
This also makes its use of LSET consistent with PCBNew.

Fixes: lp:1809019
* https://bugs.launchpad.net/kicad/+bug/1809019
2019-04-10 21:21:00 +01:00
Wayne Stambaugh f20a1314ff GerbView: remember last open gerber file dialog wildcard.
This is only for the current GerbView session.  When GerbView is closed,
the last open gerber file dialog wildcard setting is lost.
2019-04-01 12:46:11 -04:00
jean-pierre charras ff73f69d3e Gerbview: fix crash when reading a .gbrjob, and when a file given by the .gbrjob is not found.
A incorrect gerber image was created, creating crash on exit or when enable the layer view.
2019-03-24 17:32:57 +01:00