Commit Graph

4984 Commits

Author SHA1 Message Date
jean-pierre charras fb246403d2 PROGRESS_REPORTER: avoid clipping the bottom of the dialog in some cases.
It occurred on Windows, when the message to display is too long and was
displayed using 2 lines.
Now the dialog is resize after changing the message.
Fixes #7953
https://gitlab.com/kicad/code/kicad/issues/7953
2021-07-11 17:52:54 +02:00
Marek Roszko 9162013132 Add advanced cfg to force reloading memory cached 3d models 2021-07-11 00:35:38 -04:00
Marek Roszko 7cb0f8f808 Add ADVANCED_CFG to always reload cached 3d models in memory 2021-07-11 00:31:06 -04:00
Marek Roszko 79b90813ec Add ADVANCED_CFG to skip caching 3d models to file 2021-07-11 00:00:06 -04:00
Marek Roszko 1fb42c5e43 Try and cleanup the input focus/key event a little 2021-07-05 20:48:48 -04:00
Jon Evans 4f3674bd1d Fix mangling of direct json_pointer access 2021-07-05 12:33:08 -04:00
Jon Evans 3f55093bff JSON_SETTINGS: Provide explicit CloneFrom 2021-07-05 12:26:21 -04:00
Marek Roszko d2aeddc6cb Add debouncing to the choose symbol dialog.
More potato pc friendly in theory.
2021-07-04 21:59:51 -04:00
Marek Roszko 3b33f94c56 Use a wxSearchCtrl instead of wxTextCtrl for the symbol chooser window
This just makes it prettier with the search icon and cancel
2021-07-04 21:24:03 -04:00
Mikolaj Wielgus 8b2b3ca797 Define .wbk in wildcards_and_files.{cpp,h}, cosmetic code changes 2021-07-04 14:04:03 +00:00
david-beinder f33ea6f997 Kiway: Improve performance by using IDs and clearing closed frame entries 2021-07-03 22:48:46 +00:00
david-beinder a5308e5f5c Fix python console toggle to work across pcbnew/eeschema 2021-07-03 22:48:46 +00:00
Jon Evans e95323a37e Revert "Remove unused variable."
It's only unused on Mac

This reverts commit d3fb22014f.
2021-07-03 16:48:46 -04:00
Jeff Young d3fb22014f Remove unused variable. 2021-07-03 21:16:15 +01:00
Roberto Fernandez Bautista c3051ba48a Refactor SHAPE_LINE_CHAIN to allow two shapes per point
m_shapes now has two possible indices. The first one is populated if
the point is associated with an arc and the second index is populated
if the point is shared between two arcs.
2021-07-03 19:37:50 +00:00
Marek Roszko eff75b630f Get rid of anonymous struct typedefs
We are using C++14 where there is no reason for this and is banned in C++20 under P1766R1. MSVC generates a warning under C++14 as a reminder.
2021-07-01 18:28:41 -04:00
Wayne Stambaugh 175b474c3e Coverity issue fixes.
Fixes issues #280412, #314755, #329615, #332459, #332157, #332167,
2021-06-30 18:08:49 -04:00
Jeff Young 6810912f09 Refuse to load schematics from the future.
Also fixes a bug where an empty window would get left when loading
a file from the KiCad manager window errored out.

Also fixes a bug where we were getting the wrong exception because
we were rethrowing the type-casted one (rather than just calling
throw).

Fixes https://gitlab.com/kicad/code/kicad/issues/8604
2021-06-30 18:32:07 +01:00
Jeff Young 5cac8afe1d Remove long-dead revision support for LIB_IDs. 2021-06-30 13:12:57 +01:00
Jeff Young b1b4caee6a Escape "naughty" characters in symbol names.
It's tempting to say that we don't need to exclude filename chars
from symbols, but we might regret that decision down the road.  Better
to just escape them.

Fixes https://gitlab.com/kicad/code/kicad/issues/8694
2021-06-30 13:12:57 +01:00
Jeff Young 0c2ac9a711 Move GUI font code to common.
This also allows the Mac fixes for font facenames to be more
compartmentalized.

Fixes https://gitlab.com/kicad/code/kicad/issues/8657
2021-06-29 18:27:58 +01:00
Jeff Young 64f07ea9c6 Update text variables after changes.
Fixes https://gitlab.com/kicad/code/kicad/issues/8697
2021-06-29 13:55:06 +01:00
Jeff Young 8526394394 Attempt to fix gcc builds.... 2021-06-28 11:44:22 +01:00
Jeff Young d296bec5b8 Differentiate aSingleLine mode for SCINTILLA_TRICKS
This allows us to avoid the monospaced font (along with the tab-stop
handling), and process a <return> as an OK rather than just <shift> +
<return>.

Fixes https://gitlab.com/kicad/code/kicad/issues/8425
2021-06-28 11:20:12 +01:00
Marek Roszko 7802037495 Namespace the env_vars.h functions 2021-06-27 00:38:19 -04:00
Jeff Young 0f27618125 Use a list dialog that can be parented by the Board Setup dialog.
(The current one keeps pulling the Kicad Manager window to the front
on OSX.)

I also removed the UpdateUI stuff which was probably causing:

Fixes https://gitlab.com/kicad/code/kicad/issues/5049
2021-06-27 01:41:35 +01:00
Jeff Young 81fc710a5d Use consistent terminology.
Fixes https://gitlab.com/kicad/code/kicad/issues/8681
2021-06-26 10:11:41 +01:00
Jeff Young 1f4a56005e Remove extraneous isPrinting test.
Fixes https://gitlab.com/kicad/code/kicad/issues/8609
2021-06-25 12:44:51 +01: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
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
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 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 89718dd3ba Naming conventions. 2021-06-19 19:36:53 +01: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 16047b7419 3D preferences bug fixes.
1) Make sure prefs get saved when closing parent frame.
2) Add camera projection mode to settings.

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

Fixes https://gitlab.com/kicad/code/kicad/issues/8626
2021-06-17 12:22:18 +01:00
Marek Roszko 45c7c7c350 Remove unused m_crossHairPosition 2021-06-15 21:25:27 -04:00
Wayne Stambaugh ee3eac325d Expunge the use of the word part from Eeschema code. 2021-06-15 08:32:11 -04: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
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
Wayne Stambaugh 71c183d7bb Rename LIB_PART to LIB_SYMBOL. 2021-06-14 07:11:17 -04: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
Jeff Young 74cefecaac Add legacy empty-string token handling to EDA_TEXT. 2021-06-13 12:11:01 +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
Jeff Young 16b0147af8 Prefix DIMENSION types. 2021-06-11 17:59:44 +01:00
Marek Roszko 803e2101de Fix MSVC compile error
Templates and linkage, ugh
2021-06-11 07:32:41 -04: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
jean-pierre charras 1c3df973d6 Coverity warnings fixes. 2021-06-10 13:45:02 +02: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
Jeff Young de95edb5ad UI improvements for Manage Symbol Libraries.
Fixes https://gitlab.com/kicad/code/kicad/issues/8466
2021-06-09 19:20:51 +01: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
Marek Roszko 2ede720e1d Remove wx/cmdline.h include 2021-06-08 21:33:09 -04:00
Marek Roszko ffa87e69c6 Remove/replace some stdint.h includes 2021-06-08 21:17:57 -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 f2e5a5d34e Add missing cstdint include 2021-06-08 19:51:35 -04: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 cc4d38d347 Slightly "unhide" the UNDO_REDO_LIST enum 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
Marek Roszko 5db1559018 tool_base.h doesn't need eda_item.h 2021-06-08 19:12:29 -04: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 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
Marek Roszko 5bb6f8c5e3 hashtables.h doesn't need eda_item.h 2021-06-06 19:11:35 -04:00
Marek Roszko 4a1126c5e0 DIALOG_SHIM doesn't use hashtables.h 2021-06-06 19:08:34 -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
Ian McInerney 425331b655 Explictly copy TOOL_EVENT_LIST in the copy constructor 2021-06-06 18:25:17 +01:00
Ian McInerney e29b61ccc1 Fix build error with selection class 2021-06-06 17:26:12 +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 38e3b7eacd We don't need eda_item in unit_binder.h 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
jean-pierre charras 2078483f50 Fix incorrect test of wxUSE_GLCANVAS_EGL (Linux).
in wxWidgets 3.1.5 wxUSE_GLCANVAS_EGL is always defined (set to 0 or to 1)
So using "ifdef wxUSE_GLCANVAS_EGL" is incorrect.
2021-06-06 16:10:35 +02:00
Marek Roszko e234e4dc8b Remove wx/log.h from vertex_manager.h 2021-06-06 09:31:00 -04:00
Marek Roszko 4712d7a918 Remove a leaky wx/msgdlg.h include 2021-06-06 08:45:38 -04:00
Jon Evans c9a660a80c Rework JSON integration to speed up build 2021-06-05 17:08:38 -04: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
Ian McInerney f94816fbd4 Cleanup wx includes in the filter reader 2021-06-04 01:26:58 +01:00
Seth Hillbrand cccdaddd50 Adding SHAPE_ARC direct plotting 2021-06-03 17:12:56 -07:00
Marek Roszko 013209046b KIWAY_HOLDER doesnt need wx/frame.h 2021-06-03 18:59:11 -04:00
Marek Roszko c346da0ed2 Remove not needed wx/event.h include 2021-06-03 18:54:48 -04: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
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
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 5f91d3e321 Add header to bitmap_info.h.in in previous move 2021-06-03 07:14:59 -04:00