Commit Graph

4375 Commits

Author SHA1 Message Date
jean-pierre charras d87e5cb809 Revert "Revert "Apply WX_LOCALE change from master branch.""
This reverts commit 3484334d15.
2021-11-04 16:47:10 +01:00
Seth Hillbrand 3484334d15 Revert "Apply WX_LOCALE change from master branch."
This reverts commit 8e9e1a618b.
2021-11-03 15:12:37 -07:00
Seth Hillbrand a1adc59cb8 Remove all references to old website
The kicad-pcb.org website is no longer valid
2021-10-18 15:47:01 -07:00
Seth Hillbrand f3e9e3497b Cherry-picking some external run routines
Mostly from c6bcb85562 but trees have
diverged sufficiently that there are others mixed in.  This removes the
system() call on MacOS when opening a directory
2021-09-29 11:32:25 -07:00
jean-pierre charras 8e9e1a618b Apply WX_LOCALE change from master branch.
See master branch, commits 0cf81b6 and b065ff3
2021-09-29 16:54:07 +02:00
Jeff Young 2975e85950 Add (a somewhat hacked) future format error for page layout files. 2021-08-27 13:16:22 +01:00
Seth Hillbrand 0f6f30b26e Ensure collapsed tree before update
We had been maintaining the tree collapse state for "clear" actions
where the user went back to no object search.  This was helpful in the
case where we had previous items (e.g. last placed element)

But this causes isses when a sub element was previously select on GTK.
Now we choose safety for GTK over the pretty display

Fixes https://gitlab.com/kicad/code/kicad/issues/8198
2021-04-20 11:50:08 -07:00
Marek Roszko 8219334806 Fix wrong offset in msys2 x64 libcontext implementation not saving fiber data pointer
This should have/may have been causing random crashes on calls into win32 api.
fiber data is located at offset 0x20 of the stack not 0x18.
2021-04-12 19:11:44 -04:00
jean-pierre charras 13b453c21e PDT plotter: fix incorrect header (from Master branch) 2021-04-06 11:34:52 +02:00
Jon Evans fc8ffd8421 Disable Cairo canvas for Mac
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7052
2021-04-02 18:50:21 -04:00
Seth Hillbrand db1bf4351b Fix GTK crash when multiple libraries are expanded
Once more into the gtk_tree_view breach.

This may also be related to https://gitlab.com/kicad/code/kicad/-/issues/7344

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

(cherry picked from commit 4657ca5d4f)
2021-02-08 14:36:08 -08:00
Seth Hillbrand 20909d4948 Fix crash when deleting symbol in GTK
So many things can go wrong with this control in GTK.  We have to
collapse the tree when updating the search string to avoid a crash when
referencing a child object but collapsing the tree will iterate over
elements and crash when we have deleted a symbol.

The temporary fix for this nonsense is to carefully order the calls.
We only need to collapse the search tree if we are not keeping our state
(in other words if we are fully re-building the tree)

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

(cherry picked from commit 8af4cf88a0)
2021-01-04 09:38:51 -08:00
Jeff Young 1f6ff4a519 Fix access into empty container.
Fixes https://gitlab.com/kicad/code/kicad/issues/6840

(cherry picked from commit 359c29639f)
2021-01-04 09:26:01 -08:00
Marek Roszko 73b921d591 Correct assembly opcode 2021-01-02 16:20:50 -05:00
Marek Roszko 8677035989 libcontext: Call exit instead of random memory address on MSW x86_64
cherrypick of 580293c7fa

See #6820
2021-01-02 16:18:10 -05:00
jean-pierre charras a179893d70 specctra_export: fix an issue with custom pads.
From Master, commit 686254.
In some cases a created pad stack name had the same name as an other pad stack
having a slightly different shape, thus creating pads with a incorrect shape on board.

Fixes #6495 for the 5.1.10 branch.
2020-12-29 17:41:36 +01:00
Marek Roszko 9fbceaa458 Nix another easily triggered infinite event loop on Windows
This infinite loop was triggered on any dynamic scaling change with KiCad open.
Either local display scale change OR Remote Desktop.
2020-12-19 17:07:22 -05:00
Jon Evans 281180512f Prevent refresh loops on GTK/MSW
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6787
2020-12-19 14:48:13 -05:00
Jon Evans d79aee3f78 Fix refresh logic on MacOS to prevent excessive redraws
This new logic does not need to be MacOS-specific; it should
account for timer inconsistencies on any platform.

Thanks to Mark for the suggestions.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/6222
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6332
2020-12-18 13:52:57 -05:00
Marek Roszko 87bb437fd3 Fix formatting 2020-12-14 08:28:57 -05:00
Marek Roszko 626c671448 Reset frame position when wxDisplay cannot find the matching display
Fix #6732
2020-12-14 08:28:04 -05:00
Marek Roszko f66aae2213 Fix flickering on msgpanel paints 2020-12-11 23:21:26 -05:00
Marek Roszko eff9c46e59 Replace wxTextFile for writing fp info cache
wxTextFile uses wxFile which uses write syscalls which means its unbuffered.
This makes file IO more expensive against network shares where it will flush far too aggressively.
wxTextFile is fine for reads however.
2020-12-11 22:34:56 -05:00
jean-pierre charras 676d35f559 Replace wxFloatingPointValidator by our UNIT_BINDER in DIALOG_TEXT_PROPERTIES.
wxFloatingPointValidator has some limitations, but mainly the change is a try
to fix an annoying issue (#6670) we cannot reproduce but is probably related
to a locale issue.
2020-12-09 19:45:03 +01:00
Wayne Stambaugh e8bc4632b4 Minor dialog and other layout fixes.
* Fix clipped bitmap buttons.
* Remove colons from the end of wxStaticBoxSizer strings.
* Minor padding improvements.
2020-12-08 09:19:32 -05:00
Seth Hillbrand 7eea344f91 Fix/workaround GTK libtree issue with multi-unit symbols
When preparing for clearing the tree, GTK requires walking through
parents.  After calling "Freeze()" to protect against returning bad data
(see #6458 and #4471), we can no longer access Parent() from GTK and the
tree cannot be cleared.

The fix is to collapse the first element if it is open.  This prevents
the common case of the history elements being expanded in the tree

Fixes https://gitlab.com/kicad/code/kicad/issues/6102
2020-12-03 14:12:58 -08:00
Mark Roszko 5a6f291c72 Remove infinitely recursive loop on Windows (in special cases)
This looks like it was always intended for macOS but was accidentally changed for Windows as well.
If this is a requirement on windows, I'm sure theres better ways to fix it....

Cherrypick from 98ece9d
2020-11-02 13:45:14 +00:00
Roberto Fernandez Bautista 3404f4e86b Check GLEW functions exist before calling them
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6235
2020-10-30 19:45:33 +00:00
Roberto Fernandez Bautista 6c07ebe5f2 Combine return statements in OPENGL_GAL::CheckFeatures 2020-10-30 19:43:22 +00:00
Roberto Fernandez Bautista 24a4f06013 Fix OPENGL_GAL initialization sequence (Version for 5.1)
- New public static function OPENGL_GAL::CheckFeatures() gets called in EDA_DRAW_PANEL_GAL::SwitchBackend() before switching to OPENGL_GAL
- Moved all OpenGL feature checks from OPENGL_GAL constructor to OPENGL_GAL::init()

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4714
2020-10-30 17:38:19 +00:00
Seth Hillbrand 73bf4cbce7 Unselect and freeze before starting reset
In some cases, the BeforeReset() will cause an iteration over the tree
elements.  If we have deleted an element before doing this, we risk a
corruption/crash.

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

(cherry picked from commit 3bd080b64e)
2020-10-30 10:00:36 -07:00
Seth Hillbrand 8aede85214 Correct freeze ordering in lib_tree_model
Adapts the BeforeReset()/AfterReset() logic to the 5.1 branch

Fixes https://gitlab.com/kicad/code/kicad/issues/6102
2020-10-26 11:28:58 -07:00
Marek Roszko 2d25d37112 Fix focus theft, Windows sends mouse events to windows regardless of focus.
We need to check if the window is foreground before fight over focus which will make the window foreground if it wasn't.

Fixes #4099
Fixes #5958
2020-10-17 00:53:26 -04:00
Mark Roszko a3172d643f Add wxTimer stallout fix to tool dispatcher 2020-10-15 04:51:07 +00:00
Ian McInerney c30dc04571 Skip the slider event to allow the stepping to work
The stepping is in a static event handler, so it is called
after the dynamic handler and so the dynamic handler must
allow the event to continue processing.

Fixes https://gitlab.com/kicad/code/kicad/issues/5319
2020-08-29 23:32:11 +01:00
Marek Roszko 18490162f7 Use a local tmp file for plotting
Fix #5238

(cherry picked from commit de7a1b647c)
2020-08-20 15:28:18 -07:00
Ian McInerney 8ee1a7f67f Preserve the externally defined variables in the configure paths dialog
Previously the variables that were defined externally weren't being
readded to the variable map, so they would not appear in the dialog
the next time.

(Cherry-picked from fedc6519cd)
2020-08-12 00:29:17 +01:00
Ian McInerney 475385d876 Force regeneration of the lib tree on first load
Just setting the text field is not guaranteed to fire
a text event, so we must forcefully call the regenerate
function to ensure the preselect is handled.

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

(Cherry-picked from 63b53c3968)
2020-08-12 00:27:33 +01:00
Ian McInerney 1b967a07e5 Remove shadowing linewidth member from the Cairo GAL
The base GAL has the linewidth property already, and its
accessor will only return the base version. This was causing
problems with the Cairo printing GAL, since that setter wasn't
using the base class version. Also, this removes the print-specific
setter, since the actual setting of line width shouldn't be done
there and is instead done where the drawing happens.

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

(Cherry-picked from 5684708b22)
2020-08-11 00:54:23 +01:00
Jeff Young 621bfe36a8 Convert smart quotes and dashes in reports to ASCII quotes and dashes.
Fixes https://gitlab.com/kicad/code/kicad/issues/1861
2020-08-10 18:30:46 +01:00
Jeff Young c1849f7e00 Don't throw out search hits because they have unit children.
(Cherry-picked from 6aa0ceff36)

Fixes https://gitlab.com/kicad/code/kicad/issues/3746
2020-08-10 17:04:36 +01:00
Ian McInerney 78a7dd3269 Properly dismiss the grid combobox editor when it loses focus
The old way of checking for focus loss caused GTK to be unable to
even open the combobox. This way checks for the event sent when the
list closes and uses that to close the grid editor.

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

(Cherry-picked from af24a5d5a7)
2020-08-06 02:02:32 +01:00
jean-pierre charras 13b8708e58 Better fix for OPENGL_GAL::DrawSegment() than initial commit 5bdc78e.
segments having a length <= 1 internal unit are not drawn in opengl gal.
So these segments are drawn as circle.
Fix from master branch.
2020-07-31 15:44:24 +02:00
Seth Hillbrand 5bdc78e3ba GAL: Fix issue with small tracks being hidden
When drawing segments that are smaller than the segment width, OpenGL
did not use realistic values, leading to hidden, small tracks.  Instead,
we set the track to only draw a segment when the length is at least 1
radius long (so that we can see the full semi-circle at the track end)

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

(cherry picked from commit 294dabf640)
2020-07-30 15:12:17 -07:00
Seth Hillbrand bce8fb31ab Mirror hidden text in SVG plotter
We output a 0 opacity text in the SVG plotter to allow searching.  When
this text is changed to 100 opacity, it can show up on the user screen
and so needs to be mirrored to match the stroke font output

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

(cherry picked from commit b650e4568b)
2020-07-30 06:26:49 -07:00
jean-pierre charras 77d7d21130 Simulator: optimize a plot function, to support large amount of points.
Redundant points are not plotted.

From master, commit 010316457
2020-07-29 08:55:45 +02:00
Seth Hillbrand fed1520a8e Treat 0-length ovals as circles
Some buggy SVG interpreters can't handle 0-length ovals.  In this case,
they are meant to be circles, so we can export as circles in our
plotter.

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

(cherry picked from commit e38ab6c699)
2020-07-28 09:53:26 -07:00
jean-pierre charras 284d5861dd Remove creation on the fly of wxPaintEvent instances, not allowed in 3.1.4 wxWidgets
From master branch
2020-07-18 08:24:58 +02:00
Urja Rannikko ee6154c842 GAL: Remove dead code regarding SHADER_LINE_B in the fragment shader
The only test for it was only called from a function
that's called if the mode is SHADER_LINE_A, not B.

(cherry picked from commit 65ceeebc71)
2020-07-17 14:10:29 -07:00
Urja Rannikko 709197c294 GAL: Round the incoming mode parameter in fragment shader
This fixes some letters being randomly boxes and some circles
being randomly triangles on the Mali T760.

(cherry picked from commit aa7ab46a06)
2020-07-17 14:07:34 -07:00