Commit Graph

6741 Commits

Author SHA1 Message Date
Jeff Young cbe7f9057b Add link to wxWidgets bug report. 2021-06-25 10:09:49 +01:00
jean-pierre charras 964cbb95d3 gestfich.cpp: fix an issue on wxGTK when calling wxLaunchDefaultApplication()
- On wxGTK version < 3.1, the filename must be quoted if containing spaces,
and can be always quoted.
- On wxGTK version >= 3.1, the filename must *never* be quoted because
a quoted filename breaks wxLaunchDefaultApplication().
Fixes #8670
https://gitlab.com/kicad/code/kicad/issues/8670
2021-06-25 11:06:41 +02:00
Jeff Young 27804e40e2 Go back to using space-width for tabs (instead of max-char-width).
The max-char-width impl was buggy and never applied to PCBNew anyway.
Plus the stroke font has a max-char-width of 2.8 time the space width,
so it made for really wide tab spacing.

Also fixes a bug where the Scintilla editors weren't getting a
monospace font on Mac.  (This bug may also exist on the other
platforms, but each would need its own fix.)

Also moves more of the Scintalla customizations to SCINTILLA_TRICKS
where they can be shared.

Fixes https://gitlab.com/kicad/code/kicad/issues/8666
2021-06-24 23:53:27 +01:00
jean-pierre charras 450b0c9e27 single_top.cpp: re-add lines removed by commit 5fa5a73c, needed in stand-alone.
Otherwise, the main frame created in stand-alone mode is never shown.
2021-06-24 09:04:27 +02:00
Jeff Young 5fa5a73c6d File open/import progress dialogs.
Fixes https://gitlab.com/kicad/code/kicad/issues/6864

Fixes https://gitlab.com/kicad/code/kicad/issues/2166
2021-06-23 23:55:54 +01:00
Jeff Young 3269f45776 Add wxDataView-style defensive code to wxListView usage.
Fixes https://gitlab.com/kicad/code/kicad/issues/8657
2021-06-22 22:25:06 +01:00
Marek Roszko c72914c43c Use Normalize instead of MakeAbsolute
Ugh doing this while headhurts much
2021-06-21 18:07:23 -04:00
Marek Roszko 5184908dd1 Fix accidental oversight for linux run from build dir paths 2021-06-21 18:05:38 -04:00
Marek Roszko aadb62bd42 Avoid generating paths on windows with ".." in them
This causes wxwidgets to failover to legacy windows dialogs as windows doesn't know how to handle them being passed to dialogs.
2021-06-21 18:03:55 -04:00
Jeff Young fb4343bc8f Expand text bounding boxes a bit for diacriticals, descenders, etc.
Fixes https://gitlab.com/kicad/code/kicad/issues/8551
2021-06-20 23:22:56 +01:00
Jeff Young 99da3d1336 Bail on single instance checker.
We lock the project file, board, and schematic now, so the second copy
can only open them read-only.  While issues might remain, it's unclear
the warning ever prevented anyone from shooting themselves in the foot
anyway.

Fixes https://gitlab.com/kicad/code/kicad/issues/7465
2021-06-20 21:37:02 +01:00
Jeff Young 3d7e18561d Checkpoint of app-specific single-instance checking.
(I'm about to nuke single-instance checking entirely, but wanted to
make sure this was captured in GIT somewhere.)
2021-06-20 21:37:02 +01:00
Jeff Young 8631d670a4 Don't selectall in GTK text boxes.
It's not clear that it's normal platform behaviour, and some GTK
window managers fail to non draw the selection in inactive text
boxes.

Fixes https://gitlab.com/kicad/code/kicad/issues/8197
2021-06-20 21:37:02 +01:00
Jeff Young 5a43392eae Protect against double overbar format conversion. 2021-06-20 11:26:16 +01:00
Jeff Young 937f5138db Make zoom-to-fit margin big enough for infobar.
Otherwise part of the document is obscured behind it by default.
2021-06-19 22:45:47 +01:00
Érico Nogueira 88a8ef949c Remove OpenSSL locking from kicad_curl.
It's fair to assume all libcurl versions in circulation will already be
using OpenSSL>=1.1.0. This code is also unnecessary on platforms that
use other libcurl SSL backends, such as Debian's libcurl-gnutls package.
2021-06-19 19:43:54 +00:00
Jon Evans 518ccb3f9a Fix typo 2021-06-19 15:10:35 -04:00
Jon Evans 5a832fc337 Fix assert that fires sometimes when closing windows on mac 2021-06-18 18:15:00 -04:00
Jon Evans 1edc232af1 Only run window position correction on wxMac
Other platforms seem to handle this properly already, and
fighting against size changes is not desirable
2021-06-18 12:47:10 -04:00
Jon Evans 4c8a4e3d47 Fix wx 3.0 build 2021-06-18 00:21:56 -04:00
Jon Evans 32c21f4a94 Fix several window sizing problems on macOS
- Remove outdated y-offset that prevented restoring full-height
  (client area returned by wx is correct these days)
- Clamp frame geometry to fit new display when display is changed
- Handle when an automatic window reposition causes a DPI change

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8341
2021-06-17 23:59:19 -04:00
Jeff Young 7fde05e8ee Add title to Save Changes dialog. 2021-06-17 18:23:58 +01:00
Jeff Young 1722bc03b0 Consistent terminology and punctuation. 2021-06-17 00:05:17 +01:00
Mikolaj Wielgus 2a3d8e22b6 Do not create overbar from "~~" when converting to new format
Fixes bug 4 from https://gitlab.com/kicad/code/kicad/-/issues/8591.
2021-06-16 22:35:39 +00:00
Jeff Young 0d2ea6223b Don't throw in a release build if the "keep" namespace is missing.
Fixes https://gitlab.com/kicad/code/kicad/issues/8618
2021-06-16 17:31:31 +01:00
Marek Roszko 45c7c7c350 Remove unused m_crossHairPosition 2021-06-15 21:25:27 -04:00
Mikolaj Wielgus 9a42ec753f Recognize ' ', '}', ')' as terminators of overbar in conversion
Fixes bug 3 in https://gitlab.com/kicad/code/kicad/-/issues/8591.
2021-06-15 22:07:35 +00:00
Jeff Young abc5a6e775 Migrate net names in netclass info.
Fixes https://gitlab.com/kicad/code/kicad/issues/8606
2021-06-15 00:17:39 +01:00
Jeff Young 38312f0aca Don't rely on exception processing for normal flow.
Also make sure when we do update the json in the parent to use the
form that will create the object if it doesn't already exist.
2021-06-15 00:17:39 +01:00
Wayne Stambaugh fb46cd8bc5 Expunge the use of the word component from Eeschema code.
The only exception to this is the SPICE simulator's use of component
when referring to physical component (R, L, C, etc.) values.
2021-06-14 14:00:21 -04:00
Jeff Young 2c1da70181 Write all variables to temp config file and have Kicad2Step use that.
Fixes https://gitlab.com/kicad/code/kicad/issues/7670
2021-06-14 16:54:45 +01:00
Michal Schulz 44978f00e3 Use compiler-agnostic designation of fall-through in switch/case. 2021-06-14 14:52:37 +00:00
Wayne Stambaugh 71c183d7bb Rename LIB_PART to LIB_SYMBOL. 2021-06-14 07:11:17 -04:00
Mikolaj Wielgus 2af06a9d60 Fix stroke text size calculation and bitmap text overbar
Fixes bug 1 from https://gitlab.com/kicad/code/kicad/-/issues/8591.

Fixes a bug where no overbar would appear in bitmap text.
2021-06-14 09:09:30 +00:00
david-beinder da833ad7dd Separate focus from hover state in BITMAP_BUTTON, trigger after mouse down+up
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8556
Adds AcceptDragInAsClick() to maintain support for use in toolbar palettes
2021-06-13 17:00:41 +00:00
Jon Evans db276909ba Get rid of screen border region logic
This prevents restoring perfectly-valid screen locations, and
I'm not sure what problem it is trying to solve (it's already
disabled on Windows, and this is confirmed to mess up restoring
locations on Mac/Linux).

If this was actually fixing a problem, the fix needs to be more
targeted, but since I don't know what the problem was, I'm just
going to take it out for now and wait for a potential problem
to pop up again.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8595
2021-06-13 12:52:09 -04:00
Jeff Young 74cefecaac Add legacy empty-string token handling to EDA_TEXT. 2021-06-13 12:11:01 +01:00
Jeff Young a64ac820db Refresh canvas after running event from toolbar.
Fixes https://gitlab.com/kicad/code/kicad/issues/8592
2021-06-12 22:31:25 +01:00
Jeff Young d044e6fed3 Don't try and convert legacy empty-string tokens to overbar syntax. 2021-06-12 20:40:41 +01:00
Jeff Young db8cbad2d7 Add Ctrl-Q symbol to quit items in menus.
Fixes https://gitlab.com/kicad/code/kicad/issues/8391
2021-06-12 11:59:28 +01:00
Jeff Young 9328c78b08 Fix issue with overbars in bitmap text. 2021-06-12 11:49:12 +01:00
Jeff Young be980df1ca Fix uninitialized variable. 2021-06-12 11:33:18 +01:00
Seth Hillbrand 09e1a0dc48 Increase maximum zoom for pcbnew and gerbview
Zoom levels remain the same but high zooms reachable by mouse wheel

Fixes https://gitlab.com/kicad/code/kicad/issues/7093
2021-06-11 14:26:38 -07:00
Jeff Young 096e342386 Prefix TRACK, ARC and VIA. 2021-06-11 22:07:02 +01:00
Mikolaj Wielgus 63c263090f Add versioning to page layout editor worksheets 2021-06-11 18:40:57 +00:00
Mikolaj Wielgus ade38f48bc Add conversion from old `~...~` to new `~{...}` notation 2021-06-11 18:40:57 +00:00
Mikolaj Wielgus 3d520ebe1e Replace `~...~` overbar syntax with `~{...}`
Fixes https://gitlab.com/kicad/code/kicad/issues/8134

Fixes https://gitlab.com/kicad/code/kicad/issues/4227
2021-06-11 18:40:57 +00:00
Jeff Young 7fdbe2f387 Fix uninitialized variable found by JP. 2021-06-11 19:38:16 +01:00
Jeff Young 16b0147af8 Prefix DIMENSION types. 2021-06-11 17:59:44 +01:00
Jeff Young 44086ff2b2 Pull 3D preferences into KiCad preferences architecture.
Fixes https://gitlab.com/kicad/code/kicad/issues/5187
2021-06-11 11:19:40 +01:00
Wayne Stambaugh fbc135e69f Rename SCH_COMPONENT to SCH_SYMBOL. 2021-06-10 10:34:49 -04:00
luz paz 5f1e9bc8a7 Fix typos in source code 2021-06-10 01:24:15 +00:00
luz paz f968fc8719 Fix source comment / documentation typos 2021-06-09 19:32:58 +00:00
david-beinder 053bd66650 Fix localization of OS unsupported message, disallow bug reports from W7 2021-06-09 19:01:54 +00:00
jean-pierre charras 5cce3f6e18 Fix a few Coverity warnings (not initialized vars) and a minor compil warning 2021-06-09 19:03:44 +02:00
Jeff Young 9411d301a0 Repair recent pass-by-reference cleanup.
Fixes https://gitlab.com/kicad/code/kicad/issues/8576
2021-06-09 10:56:53 +01:00
Marek Roszko fad5f9881a Remove abandoned variable and thus another include 2021-06-09 00:07:12 -04:00
Marek Roszko d946d6e68f Cleanup some pgm_base.h includes 2021-06-08 21:56:00 -04:00
Marek Roszko 19faadf149 Move wx/dynlib.h include to source file 2021-06-08 21:35:02 -04:00
Seth Hillbrand ea283625a7 Further simplification of AA regime
Reduce each (Accel & Fallback) to 3 options: Off, Fast, Good.  Fast AA
in accelerated canvas uses SMAA with tweaks suggested by David Beinder.
Good AA is super-sampled x2.

Cairo is similarly reduced to Off, Fast, Good, which map to the Cairo
options themselves.  Best is removed as it mostly affects text rendering
and not line drawing (as our text is)
2021-06-08 17:20:41 -07:00
Marek Roszko 6e01ce84b9 Break out eda_item_flags.h, fix the typedef to std::uint32_t, fix some signed vars 2021-06-08 19:12:30 -04:00
Marek Roszko b2f5c989a6 Suppress leaking eda_item so much via undo_redo_container.h 2021-06-08 19:12:30 -04:00
Marek Roszko 20134e4a1b Evict some more eda_item.h includes 2021-06-08 19:12:29 -04:00
Jeff Young 2aaec31832 Don't put up "old version" warning for gerbview-generated PCBs.
Fixes https://gitlab.com/kicad/code/kicad/issues/8574
2021-06-08 22:12:44 +01:00
Wayne Stambaugh e6346e3103 Pass objects by reference instead of on the stack part 2. 2021-06-08 13:47:21 -04:00
Wayne Stambaugh 9ebabb222c Pass objects by reference instead of on the stack. 2021-06-08 10:09:38 -04:00
Marek Roszko ab82b01714 Evict the last bits of wx.h 2021-06-07 20:23:27 -04:00
Jon Evans ad6256bdca Fix linux/wx3.0 build 2021-06-07 19:07:49 -04:00
Marek Roszko 0e16db0c25 Kick wx.h mostly out of common 2021-06-07 18:38:52 -04:00
Marek Roszko ca9b719af3 Add missing headers for linux post wx.h removal 2021-06-07 18:22:20 -04:00
Marek Roszko 69d7a23e1c Start cleaning out wx/wx.h in cpp files 2021-06-07 18:20:47 -04:00
Marek Roszko 8f2819cfa4 Kill the last of wx/wx.h in headers 2021-06-07 17:59:20 -04:00
Johannes Maibaum 022dd6072c Add utility method to resolve symlinks
The same logic block to resolve possible symlinks exists in 5 different
places now. This change moves this duplicated code to a static member
function of WX_FILENAME instead.
2021-06-07 20:59:59 +00:00
Jeff Young 3ff670d2a4 Disable ACTIONS::openPreferences for now.
wxWidgets needs to move the item to the KiCad menu on Mac, and it
can only find it if it has the id wxID_PREFERENCES.
2021-06-07 20:51:45 +01:00
Wayne Stambaugh 08e8b17029 Minor plotter code improvements. 2021-06-07 14:32:27 -04:00
Seth Hillbrand 4c293e0936 Clarify AA options
Moves the OpenGL AA options to the same Fast/Balanced/HQ options as used
in Fallback.  Fast and Balanced are the SMAA options, with decreasing
threshholds and more processing in the balanced version.  HQ is
supersampling x2.  This takes more memory and may not work for HiDPI
screens with underpowered graphics cards.  But it looks the best of the
three options.

The SSx4 option is removed as it added little benefit in either regular
or HiDPI screens

Fixes https://gitlab.com/kicad/code/kicad/issues/5196
2021-06-07 09:40:15 -07:00
Seth Hillbrand 0a31e2d4fd Tweak AA settings for fast/balanced SMAA 2021-06-07 09:40:14 -07:00
jean-pierre charras 6cfc2755ed Remove a useless "#include wx/wx.h" from wx_html_report_panel.h 2021-06-07 09:26:13 +02:00
Marek Roszko 3ae4aa493f cadstar_archive_parser.h doesn't need dsnlexer.h 2021-06-06 19:34:53 -04:00
Marek Roszko 5bb6f8c5e3 hashtables.h doesn't need eda_item.h 2021-06-06 19:11:35 -04:00
Marek Roszko 10e60acf34 Clean up including of board_design_settings.h 2021-06-06 15:03:42 -04:00
Ian McInerney dc27079b71 cleanup tool event and tool action includes 2021-06-06 18:26:26 +01:00
Marek Roszko 527bda5d58 Split out selection.cpp to reduce header sharing
selection.h is included into 782 compilation units....
2021-06-06 11:09:07 -04:00
Marek Roszko fcb21038cb Reduce some eda_item.h usage in headers 2021-06-06 11:09:06 -04:00
Dominik Sliwa 3d45e8dccc Fix macos build 2021-06-06 14:37:39 +00:00
Marek Roszko e234e4dc8b Remove wx/log.h from vertex_manager.h 2021-06-06 09:31:00 -04:00
Marek Roszko 581ba21865 Remove wx includes out of cadstar_archive_loader.h 2021-06-06 09:28:02 -04:00
Jon Evans eaf178cd2a Fix load of nested settings 2021-06-06 08:39:02 -04:00
Jon Evans 28909c1a72 Maybe fix arch build 2021-06-05 22:10:23 -04:00
Jon Evans c9a660a80c Rework JSON integration to speed up build 2021-06-05 17:08:38 -04:00
david-beinder 86add3bb85 Fix MSVC C4312 warnings when casting 32bit ints to pointer types on 64bit builds 2021-06-05 02:57:51 +00:00
Jeff Young 5f37161c74 Tooltip for selection tool.
Fixes https://gitlab.com/kicad/code/kicad/issues/8544
2021-06-04 23:13:14 +01:00
david-beinder 2b4564571c GAL: Tune SMAA to have a conservative and aggressive mode
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8522
Conservative makes SMAA usable in Eeschema through weaker AA.
Aggressive reduces some artifacts compared to the High preset.
Restores the unused Ultra preset in the shader source to its original state.
2021-06-04 17:48:34 +00:00
Michal Schulz 8da77422d0 added missing wx/scrolwin.h header. Required by wxScrolledWindow. 2021-06-04 17:46:07 +00:00
Marek Roszko 564826feae Use wxRect in dialog_shim rather than eda_rect for purely gui logic 2021-06-03 21:11:08 -04:00
Seth Hillbrand cccdaddd50 Adding SHAPE_ARC direct plotting 2021-06-03 17:12:56 -07:00
Seth Hillbrand 3d4ce0796e Add Gerber plot for SHAPE_ARC and SHAPE_LINE_CHAIN 2021-06-03 17:12:56 -07:00
Marek Roszko b1c9083743 Remove the wx/docview.h include 2021-06-03 18:42:08 -04:00
Marek Roszko 4e94b1fe86 Remove the universal sockets include 2021-06-03 17:59:46 -04:00
Seth Hillbrand 4486cdb92e Don't use wxApp-dependent functions in headless
When running headless, e.g. from Python script, the wxApp has not be
instantiated, so we cannot use wxConfig.  In this case, we fall back to
the class defaults in ADVANCED_CONFIG()
2021-06-03 12:31:45 -07:00
Ian McInerney 2de010f08b Fix ordering of class constructor init list 2021-06-03 20:04:00 +01:00
Hajo Nils Krabbenhöft 937f502158 Improve accelerated supersampling 2x antialiasing
Avoid fractional pixel offsets by forcing integer division of m_screenSize.
Shift rounded lookAtPoint onto OpenGL pixel center to ensure consistent rounding to int.
The pixel 0..1 @ 1x needs to fill the area 0..2 @ 2x so its center moves by 0.5 * (pixel size @ 1x).
2021-06-03 17:53:51 +00:00
Wayne Stambaugh 7c14e4e967 Common widget header housekeeping. 2021-06-03 12:02:45 -04:00
Ian McInerney 5306ba4d55 Add missing header to eda_base_frame 2021-06-03 13:45:41 +01:00
Marek Roszko 4df3cb912d Remove another leaky wx/log.h header 2021-06-03 08:11:15 -04:00
Marek Roszko 7faee5eda5 Stop salt the eart with wxhtml.h 2021-06-03 07:49:49 -04:00
Marek Roszko b5b76eedf7 Avoid sharing gdicmn for just bitmaps 2021-06-03 01:46:04 -04:00
Marek Roszko 8ea180c6b7 Don't leak wx/debug everywhere via tool_event 2021-06-03 01:36:12 -04:00
Marek Roszko 29783f125b Eliminate one wxRect constructor in BOX2
The only usage auto converted to BOX2D anyway...
2021-06-03 01:27:15 -04:00
Ian McInerney 3ab69939f9 Remove wx.h from many files 2021-06-03 02:19:20 +01:00
Marek Roszko af2707929d Don't leak a wx header via eda_item.h
Turns out this provided the translation header globally :D
2021-06-02 19:18:48 -04:00
Marek Roszko eeb405c196 Cleanup some more excess math/util includes 2021-06-02 00:50:46 -04:00
Jon Evans c8f308dd36 Update hotkeys dumper to use asciidoctor keyboard macro 2021-06-01 22:46:02 -04:00
Marek Roszko 45d1684bbe Move inline function declaration to allow removing include 2021-06-01 19:03:22 -04:00
Marek Roszko cf2bb5692a Remove the wxLog calls from math/util.h for now
This was leaking windows headers and partial wx headers to 1084 compilation units......
This also means math/util.h is leaking to 1084 compilation units which seems a bit high too.
2021-06-01 18:44:22 -04:00
Seth Hillbrand 3ca9e2d2b6 Add missing wxString* conversion
Python needs to know how to optionally convert to a wxString* for SWIG
to build out the interface.
2021-06-01 20:18:24 +00:00
Marek Roszko 6b18803221 Fix another typedef conflict 2021-06-01 20:18:24 +00:00
Seth Hillbrand c0bc6b1107 Fix compile errors on MSVC 2021-06-01 20:18:24 +00:00
Seth Hillbrand 88e4b7f7c4 Update Python Helpers 2021-06-01 20:18:24 +00:00
Seth Hillbrand bf1437899e Add Python Tool to pcbnew 2021-06-01 20:18:24 +00:00
Seth Hillbrand c7d188a8d0 Centralizing SCRIPTING class 2021-06-01 20:18:24 +00:00
Seth Hillbrand 192fbfd5e5 Finalize Python Frame 2021-06-01 20:18:24 +00:00
Seth Hillbrand 81d58bcea9 Working python window 2021-06-01 20:18:24 +00:00
Seth Hillbrand f274a00c08 Remove PYTHON_* compile options 2021-06-01 20:18:24 +00:00
Jon Evans 247da631f9 Revert "Fix typo and clean up leftover tracks"
This reverts commit ed66c0f14d.

Revert "Clean up co-linear tracks after finishing routing"

This reverts commit 1a102f03c0.

More complex solution needed

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8526
2021-06-01 11:18:00 -04:00
Jon Evans 1a102f03c0 Clean up co-linear tracks after finishing routing
This involved adding some extra infrastructure to be able
to handle the case where a track that is sitting in the
router's commit waiting to be added to the board actually
needs to be deleted instead.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8419
2021-05-31 17:36:38 -04:00
Jon Evans 793f133815 Apply shift-hotkey fix to all platforms
Fixes https://gitlab.com/kicad/code/kicad/-/issues/1809
2021-05-31 11:44:00 -04:00
Jeff Young c4cabb38d5 More worksheet -> drawing sheet cleanup.
Fixes https://gitlab.com/kicad/code/kicad/issues/8516
2021-05-31 12:26:44 +01:00
Tomasz Wlostowski 2b955437b6 VIEW_OVERLAY: add Get[Fill/Stroke]Color methods. 2021-05-31 00:15:16 +02:00
Jon Evans d856b01d32 Contextual hotkeys can overlap for different tools
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8512
2021-05-30 14:12:03 -04:00
Jon Evans b7f32d7f53 Clean up some layout of pages in Board Setup
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8474
2021-05-30 14:04:00 -04:00
Jeff Young 58fe89a050 Fix some issues with button alignment and order on OSX. 2021-05-29 22:10:43 +01:00
Jon Evans ae84696341 Fix shift-modified hotkeys in GTK (thanks Ian)
Fixes https://gitlab.com/kicad/code/kicad/-/issues/1809
2021-05-29 13:18:20 -04:00
jean-pierre charras 81c7fb61f8 Sub-menu "Preferences..." in main menu "Preferences": fix not working accelerator key.
Accelerator keys are disable in our WX_MENUBAR. A common ACTION_MENU is used and
"Preferences..." is now shown in Hotkeys list.
2021-05-29 18:09:49 +02:00
jean-pierre charras 37c31196f4 Eeschema, importFile: build the HTML report messages before displaying the dialog.
Fixes #8507
https://gitlab.com/kicad/code/kicad/issues/8507
2021-05-29 10:23:11 +02:00
Seth Hillbrand ebcce9ae0a Handle directory entries in Archive Project
ZIP archives may have entries that are only directories.  We should not
try to extract this entries (they have no length); instead, we merely
create the path and continue
2021-05-28 16:24:15 -07:00
Seth Hillbrand 752ae4d519 Rename modification flag routines
Differentiates better between the EDA_ITEM IsModified(), referring to
items themselves changing and the EDA_SCREEN IsContentModified(),
referring to whether we have made any unsaved changes.
2021-05-28 12:07:04 -07:00
Seth Hillbrand 11438eb0ec Add standard wire orange and correct color init
Initialized COLOR4D takes an EDA_COLOR_T enum but then referenced it as
an index to the color table.  This uses the enum as comparison against
the table-stored enum.

Adds standard orange to picker swatches
2021-05-28 11:51:54 -07:00
Seth Hillbrand d7f219e98f Unify IsSave and IsModify
The flags and calls were used identically, leading to potential
confusion/bugs.  Testing for modification should go through
IsContentModified()
2021-05-28 11:51:54 -07:00
Wayne Stambaugh 19607f1488 Fix file browser text button default path handling. 2021-05-27 14:19:06 -04:00
david-beinder c692b04eb9 Improve native language names
Use the most common form, same as Wikipedia
2021-05-26 07:03:42 +00:00
Seth Hillbrand 2131a44889 Correct Finnish language name
Fixes https://gitlab.com/kicad/code/kicad/issues/8464
2021-05-21 13:29:40 -07:00
Jeff Young 4a77a4080d Fix Coverity warning. 2021-05-21 14:38:15 +01:00
Jeff Young e93e9fa3e5 Add rudimentary type checking to rule eval with reporter.
Also cleaned up existing error reporting to not expend CPU cycles
when there was no reporter.

Fixes https://gitlab.com/kicad/code/kicad/issues/8438
2021-05-20 23:06:24 +01:00
Jeff Young ccaf9e11df Load footprint info when there's no cache available.
Fixes https://gitlab.com/kicad/code/kicad/issues/8371
2021-05-14 22:24:21 +01:00
jean-pierre charras 6f9dbd3548 Add missing surname to a contributor. 2021-05-12 08:18:05 +02:00
Jeff Young 12f985f978 Add Quit and Close to the HotKeys list.
Fixes https://gitlab.com/kicad/code/kicad/issues/8391
2021-05-11 23:25:13 +01:00
Jeff Young 7356f9568d Move grid disable modifier from ALT to CTRL.
Also had to move the H/V/45 disable modifier from CTRL to SHIFT.

Fixes https://gitlab.com/kicad/code/kicad/issues/8124
2021-05-09 20:17:40 +01:00
david-beinder 49d02560e4 In footprint filter, check pin count mismatch first 2021-05-06 22:00:06 +00:00
Jeff Young 2e3860de6f Naming conventions. 2021-05-05 22:58:40 +01:00
Wayne Stambaugh d2a7f81b10 Debugging improvements and clean up.
* Remove unused wxLogDebug calls.
* Add add application level character tracing to detect unhandled key
  events.
* Catch unhandled exceptions in KiCad main event loop like single top
  applications.
2021-05-03 18:08:15 -04:00
Roberto Fernandez Bautista f2677340f2 Access the new paste behaviour via a new Paste Special... dialog
ADDED Paste Special... action in pcbnew

CHANGED Additional options for Paste Special... in eeschema, including
"Assign unique reference designators to pasted instance"
2021-05-03 19:38:32 +01:00
Roberto Fernandez Bautista 0f0c5c194b Add qa test: save and reload schematic with page numbers
Note: PGM_BASE::InitPgm() is creating a SETTINGS_MANAGER object, which
in turn tries to display a "migrate settings" dialog when no settings
are found, but obviously the dialog can't be displayed inside docker.

Needed to add an optional parameter to InitPgm() in order to allow
running in headless mode.
2021-05-03 19:38:31 +01:00
Roberto Fernandez Bautista ae009e0758 Ensure clipboard data is available after KiCad closes
Always Flush() after SetData()
2021-05-03 19:38:31 +01:00
Roberto Fernandez Bautista 5822cd85c4 Fix eeschema copy/paste: save and load sheet and symbol instances
Save sheet and symbol instance information to the clipboard on copy

Load sheet and symbol instance information from the clipboard on paste
and renumber page numbers after loading.

Correctly handle pasting in a multiple hierarchy by ensuring symbol and
sheet instances are updated for all instances of the destination sheet.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8207
2021-05-03 19:38:31 +01:00
jean-pierre charras aee1593678 Fix wxWidgets alerts
Fixes #8346
https://gitlab.com/kicad/code/kicad/issues/8346
2021-05-02 16:02:33 +02:00
jean-pierre charras 6b9e44e59c pl_editor: save comment associated to DS_DATA_ITEM graphic items.
The editor has an entry to set a comment associated to a graphic item.
It is only for the designer, but the code to save it in .wks file when not empty was missing.
The code to read it exists since the beginning, so no change in file format
2021-05-02 08:59:15 +02:00
Jeff Young 16ebb3a433 Fix Mac compile error and clean up some other includes. 2021-05-01 22:25:41 +01:00
Marek Roszko 0dd746548a DS_DATA_MODEL::LoadDrawingSheet actually was meant to accept blank filenames as a good thing
It was there...if you stared at it long enough
2021-05-01 15:55:25 -04:00
Marek Roszko 6b03b26364 Actually ensure we cleanup in case of failure in dialog_page_settings 2021-05-01 14:14:57 -04:00
Marek Roszko d4bb1cbc63 Make drawing sheet loading slightly smarter 2021-05-01 14:11:31 -04:00
jean-pierre charras f6f2284851 Fix missing includes on Linux after commit 0427bda7 2021-05-01 20:05:01 +02:00
Jon Evans 5b040f16a3 Refactor environment variable storage
CHANGED: Environment variables defined outside of KiCad will no longer
         be saved in the settings file.  Paths can be configured via
         the Configure Paths dialog and those changes will be saved in
         the settings file if the new path is different from the default
         and the path variable was not defined in the system environment.
2021-05-01 13:39:43 -04:00
jean-pierre charras 0427bda768 Remove useless wx/wx.h include, that create sometimes compil warnings on msys.
wx/wx.h includes all wxWidgets .h files, and sometimes creates collision
names in #define between kicad and windows headers
Moreover, blindly including a lot of useless files is compil time consuming
2021-05-01 19:32:15 +02:00
Marek Roszko cc1bfd4c18 Harden drawing sheet loading slightly...
The fact it blindly assumed it would always work makes me sad :( So this is just ducktape
2021-05-01 13:20:58 -04:00
Marek Roszko eb343d3f8f Avoid using the string type name as a variable name 2021-05-01 11:13:53 -04:00
Marek Roszko b243c2280d enum class PAD_SHAPE_T 2021-05-01 08:22:35 -04:00
Marek Roszko ca1b98a4ab Fix type in check just added for arch 2021-04-30 19:25:57 -04:00
Marek Roszko cbad18ad98 Hide gal profiling behind KICAD_GAL_PROFILE cmake option
__WXDEBUG__ is too easy to get set
2021-04-30 19:24:36 -04:00
Marek Roszko 51fee0a3ad Add binary bitness in version info.
Fix #4425
2021-04-30 19:24:36 -04:00
Marek Roszko f083f043cb Account for taskbar being on top for determining window positions on launch
Windows doesnt need an ambiguous "screen border region" defined in percent, it's an absolute area given in pixels
Also we need to check the top corner y value to the ClientArea returned from the wxDisplay, in the situation the task bar is on top.

Fix #7850
2021-04-29 20:18:19 -04:00
Jon Evans 64d35ecebc Enable dark mode for MacOS 2021-04-28 23:24:19 -04:00
Jon Evans f00cee438f Fix running from build dir on MacOS after recent build system changes 2021-04-28 23:21:19 -04:00
Hanya 4b5cff8c5d Readd half and full width forms 2021-04-28 17:27:07 +00:00
Jeff Young ddeac126ad Dialog spacing.
On OSX GUI guidelines require "destructive" buttons to be spaced away
from other buttons.
2021-04-25 19:28:41 +01:00
Jon Evans d3194cc6db Work around wxWidgets ConvertToDisabled not being dark-mode aware
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8297
2021-04-25 13:05:23 -04:00
Ian McInerney ecd9bf696e Be consistent about using nullptr instead of 0
0 can be too easily overloaded into an int, so ensure we use nullptr
when we mean pointers.
2021-04-22 22:20:34 +01:00
Jon Evans e7d3bf29aa Don't save project for legacy board without explicit action
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7368
2021-04-21 21:27:23 -04:00
Marcus A. Romer 6fdf567b21 Redirect to website when help files are missing
In case the documentation and help files from kicad-doc are not
installed or are located in a folder where KiCad cannot find them, an
info dialog is shown offering the user the option to access the online
help system instead.

Fixes https://gitlab.com/kicad/code/kicad/issues/2142
2021-04-21 19:19:25 +00:00
Marcus A. Romer c5e77e9739 Respect KICAD_DOCS when searching for help files
On Linux, the documentation and help files are potentially installed to
a non-standard location (i.e., outside of /usr/share/doc/kicad/). This
can be the case when, e.g., multiple versions of KiCad are installed in
parallel. Making KICAD_DOCS available at run-time is the only viable
solution to allow the applications to find the help files in this case.

Fixes https://gitlab.com/kicad/code/kicad/issues/7874
2021-04-21 19:19:25 +00:00
Marcus A. Romer a97ccbf7ed Refactor help file search logic
Rely on existing code to initialise the list of paths in which the KiCad
documentation might be located, thereby making SearchHelpFileFullPath
platform-agnostic and easier to read.
2021-04-21 19:19:25 +00:00
Jeff Young dff5e7c55e Adjust infobar error/warning times.
My last bump up in the times might have been too much.  Try to find a
middle ground.
2021-04-21 15:40:59 +01:00
Jon Evans 693413b47e Fix project saving in pcbnew standalone when project is new
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8244
2021-04-20 20:59:51 -04:00
Marek Roszko ce3a84f579 Consolidate wx aui dock art color setting 2021-04-19 21:12:02 -04:00
Jon Evans eac2700af6 Launcher: use unscaled bitmaps
This is not really a toolbar so we should not scale here
2021-04-19 17:18:17 -04:00
jean-pierre charras 1bfa3dc6a5 Fix an annoying issue (wxMSW specific) about X_VIEW_CONTROLS::CaptureCursor()
On MSW, CaptureMouse() was sometimes called event if the GAL panel has
captured the mouse (that was not accepted by wxMSW), although HasCapture()
returns false.
(Perhaps some race condition between events)
The fix add a flag to avoid calling twice CaptureMouse() after only one
wxEVT_MOUSE_CAPTURE_LOST event was received.
Fixes #8239
https://gitlab.com/kicad/code/kicad/issues/8239
2021-04-19 21:23:07 +02:00
Jonathan Haas 325ab738b5 Use a slightly less egregious hack to enforce linespacing in DRC reporter, that also works on GTK
Fixes https://gitlab.com/kicad/code/kicad/issues/7319
2021-04-18 20:18:02 +00:00
Ian McInerney ae91042544 Implement thread safety for symbol loading routines
These functions can be called from any thread of the library
loader, so we need to ensure we have some thread safety with them.
2021-04-18 18:39:46 +01:00
Jeff Young 13473420e5 Remove duplicated routine and fix bug in UTIL version. 2021-04-17 15:10:59 +01:00
Wayne Stambaugh 2ae264751f Rename class_board_stackup.{h|cpp} to board_stackup.{h|cpp}. 2021-04-16 17:07:06 -04:00
Ian McInerney 43425d7306 Add logging of the functions used in the coroutine implemntation 2021-04-16 17:49:52 +01:00
Ian McInerney e7798d8f23 Add another logging call to the tool manager 2021-04-16 17:49:52 +01:00
Ian McInerney e237b6a2af Add thread sanitizer support to Cmake 2021-04-16 17:49:52 +01:00
Ian McInerney 0bdce00c42 Be explicit we don't care about the wxID of the control 2021-04-16 17:49:52 +01:00
Jeff Young 3a6a919097 Improve clarity in the Print dialog around edge cuts layer.
Fixes https://gitlab.com/kicad/code/kicad/issues/8200
2021-04-16 16:53:51 +01:00
Jon Evans 433e148e08 Move some string formatting functions out of base_units
Keeping them in base_units means that we can't introduce
any dependence on these functions to anything that needs to
compile without one of the unit defines (EESCHEMA, PCBNEW, etc)
2021-04-14 23:21:10 -04:00
Marek Roszko 43e93cc801 Force disable the native dropdown caret on grid comboctrl's we create
Fix #7212
2021-04-14 22:54:40 -04:00
Marek Roszko cb215a0abe Ensure our grid helper comboctrls generate returns as events instead of internally processing
Fix #1874
2021-04-14 21:37:21 -04:00
jean-pierre charras 7c64dba333 NUMERIC_EVALUATOR::parseSetResult(): fix incorrect use of %g to print a double.
This function is used in UNIT_BINDER, that does not accept floating notation
with exponent, that can be generated by parseSetResult().
As a result: values < 0.0001 cannot be entered in a UNIT_BINDER.
2021-04-14 19:47:03 +02:00
Jon Evans 4f191ce2c7 Squash GCC warning about boolean expression 2021-04-13 21:53:43 -04:00