Commit Graph

4281 Commits

Author SHA1 Message Date
Jon Evans c054944d67 Set real-time connectivity to on by default with a safety valve 2019-04-29 18:59:32 -04:00
Jon Evans 49e88b267a Fix KICAD_RUN_FROM_BUILD_DIR on MacOS 2019-04-28 21:59:51 -05:00
John Beard 10900c918f Eeschema: Fix/circumvert GTK3 tree view bug
There is a rendering bug in GTK3, which appears to be
an upstream GTK issue.

This can be worked around by, when filtering, ensuring the
*parent* item of the selected item is visible. This will
not cause the selected item to not be visible, as the selected
item will be the first shown child. So it will be visible, as long
as the list box is greater than a single row high, which it will be
in all practical scenarios.

This is done on all platforms, as it has a beneficial side-effect:
the parent library of the selection is naturally shown to the
user, so they don't need to scroll up to see what library their
current filter selection was in.

Fixes: lp:1804400
* https://bugs.launchpad.net/kicad/+bug/1804400
2019-04-28 17:12:12 +01:00
John Beard fcc4a84e0e GAL: add some trace to GAL display options config
This can be helpful when tracing where certain configurations
come from (some apps load from other apps' config basenames).
2019-04-27 14:57:14 +01:00
John Beard d89d0e6b74 SHAPE_ARC: Fix bug introduced in 5813164d1.
This fixes the bug exposed in the previous commit.
The tests which exposed it now pass and expected failures
removed.
2019-04-25 23:49:42 +01:00
Tomasz Włostowski 5813164d15 SHAPE_ARC: fixed polyline conversion bug introduced in e312e2b286
Fixes: lp:1826278
* https://bugs.launchpad.net/kicad/+bug/1826278

Fixes: lp:1826270
* https://bugs.launchpad.net/kicad/+bug/1826270
2019-04-25 15:30:27 +02:00
Jon Evans 1426a4f3cf Ensure shown text is cached at creation 2019-04-25 00:46:51 -04:00
Jon Evans 3bfe5fb84b Cache unescaped text to boost connectivity performance 2019-04-25 00:14:25 -04:00
John Beard 15bba27406 BITMAP_BASE: Add const image data accessor
This allows a const BITMAP_BASE to expose const image
data. This is currently done with const_casts, which is
"OK", only as long as the source image is not declared
const, in which case it's undefined behaviour.

Also immediately dereference the pointer to a reference
if it's not checked to make the non-null requirements
explicit at the point of access.
2019-04-24 17:31:22 +01:00
John Beard e687d14903 Remove useless const_casts
Both versions of EDA_DRAW_FRAME::isBusy have a useless const_cast.

GetScreen() const returns a non-const SCH_SCREEN already, it doesn't
need to be cast, and it's stored in const SCH_SCREEN anyway.
2019-04-24 09:46:01 +01:00
Jeff Young 1a007c3e4b Implement SCH_SELECTION_TOOL (but still with legacy semantics). 2019-04-22 22:08:18 +01:00
Jeff Young a461eae8b9 Fix 100s of usages of GetFlags() which conflated != 0 with being edited.
While this was true long ago, many flags have been added since which
have nothing to do with editing (HIGHLIGHTED, BEGIN_ONPAD, etc.)
2019-04-22 09:58:06 +01:00
Jon Evans dffd1179c5 Add a mechanism to load kifaces when run from the build directory
This is useful when working on code paths that rely on KiWay
communications, since you can run and debug the kicad application
without needing to run an install task first.
2019-04-20 15:08:34 -04:00
John Beard 6ad97e5b5b Kicad Curl: Ignore unused functions for OpenSSL >= 1.1.0
In OpenSSL 1.1.0 and newer, the locking callback macros do nothing.
This causes unused warnings for the static function lock_callback.

Ignore this function on newer OpenSSL builds, but keep
the infrastructure for now.

When OpenSSL's min version is 1.1 or greater, all the locking
infrastructure can be removed.
2019-04-18 16:24:29 +01:00
Jeff Young 0772b54845 Move eeschema zoom-selection to modern toolset.
Fixes: lp:1825164
* https://bugs.launchpad.net/kicad/+bug/1825164
2019-04-17 21:49:50 +01:00
John Beard e312e2b286 SHAPE_ARC: fix polyline conversion when radius=0
Prevent a divide-by-zero bug in SHAPE_ARC::ConvertToPolyline.

When the radius is zero, just use the initial angle (it makes
no different anyway, the result is the centre point, which is
the start point.
2019-04-17 10:52:56 +01:00
jean-pierre charras 4d3e86d795 DIALOG_CONFIGURE_PATHS: do not allow users to define the env var KIPRJMOD
It always defines the project path, and should never be defined by users.

Fixes: lp:1824912
https://bugs.launchpad.net/kicad/+bug/1824912
2019-04-16 11:41:30 +02:00
jean-pierre charras ad5a1fd963 SIM_PLOT_FRAME: cosmetic enhancement: add icons in main menu.
Fix also Upeer/lower case issues in main menu strings.
2019-04-14 15:31:46 +02:00
Jeff Young 91bf08df1a Move ZoomFitScreen from GetBoundingBox to GetDocumentExtents. 2019-04-14 01:44:47 +01:00
Jeff Young 67bdf61682 Fix extra include. 2019-04-13 20:20:02 +01:00
Jeff Young 94a948fdd1 Move grid selection for both Eeschema and Pcbnew to COMMON_TOOLS. 2019-04-13 18:43:35 +01:00
Jeff Young fc7f5630c7 Move eeschema zoom operations to modern toolset. 2019-04-13 18:43:26 +01:00
Jon Evans dec5d80180 Veto mouse warping from DRC dialog
Fixes: lp:1824630
* https://bugs.launchpad.net/kicad/+bug/1824630
2019-04-13 11:23:57 -04:00
Seth Hillbrand 822cd9c6ef eeschema: Remove UR_WIRE_IMAGE
The wire image undo/redo option required special handling and was only
used in a single location.  Replacing with single change handling
reduces the code complexity
2019-04-13 07:11:24 -07:00
John Beard 203019d959 Fix GAL option spin button layout
These need to not be wxEXPAND and to be vertically centred
to match the adjacent text controls.

Fixes: lp:1804461
* https://bugs.launchpad.net/kicad/+bug/1804461
2019-04-12 23:35:54 +01:00
Seth Hillbrand d70ae19cb8 eeschema: Move realtime connectivity to adv config
This allows realtime connectivity testing by modifying the
kicad_advanced setting rather than recompiling
2019-04-12 08:37:44 -07:00
John Beard ab2281d26f GAL opts: move config reading into GAL_DISPLAY_OPTIONS
Move repeated GAL config reading routines into GAL_DISPLAY_OPTIONS.
THe app-level config is in here already, do the same for the
common config.

This means that the configs are loaded consistently, which fixes
the symbol-chooser preview window, which previously didn't use the
same config routine as other GAL canvases.

Future work could move these functions to free functions that
act on the public interface of GAL_DISPLAY_OPTIONS to avoid
GAL_DISPLAY_OPTIONS having to know about wxConfig and wxWindow.

Fixes: lp:1824524
* https://bugs.launchpad.net/kicad/+bug/1824524
2019-04-12 16:08:11 +01:00
Jeff Young 0021ecf51e Don't double-escape netnames.
Netnames in wxChoice or wxListBox are already in internal format
and don't need escaping again.

Fixes: lp:1823863
* https://bugs.launchpad.net/kicad/+bug/1823863
2019-04-12 00:28:58 +01:00
Jeff Young 3c11b89e4c Hook up refresh buttons to library tree synchronisation.
Fixes: lp:1820057
* https://bugs.launchpad.net/kicad/+bug/1820057
2019-04-11 19:45:10 +01:00
jean-pierre charras 63db3f7c17 Disable escaping special chars in netnames because it creates much more issues than it fixes.
Especially the netnames shown on screen are not those living in netlists,
breaking net info in Spice, Gerber X2 and IPC356 for instance
2019-04-11 18:36:21 +02:00
Seth Hillbrand 8c9244e677 Revert "eeschema: Connectivity threading"
This reverts commit 1a031e771f.

Some nets broken in commit.
2019-04-10 20:08:42 -07:00
Seth Hillbrand 1a031e771f eeschema: Connectivity threading
This threads the first step (update item) in the connectivity routine.
Also eliminates the duplicate call for multiple copies of the same
sheet.
2019-04-10 15:04:22 -07:00
Seth Hillbrand 2048114512 Reduce chance for wxPoint hash collision
Hash collisions reduce the speed of unordered maps by increasing the
comparison time of underlying values.  This implements the inverse
golden ration offset into the x value to ensure that consecutive points
are far from each other in the map.
2019-04-09 20:40:04 -07:00
Seth Hillbrand 257d9b5fe9 Allow setting the kicad config dir
This allows setting the config dir at build time, providing packagers a
method of controlling where the configuration files are placed.

Fixes: lp:1780601
* https://bugs.launchpad.net/kicad/+bug/1780601
2019-04-08 12:33:49 -07:00
Jeff Young adf3637476 Allow dialogs to veto mouse-warping when called from context menu.
Fixes: lp:1745731
* https://bugs.launchpad.net/kicad/+bug/1745731
2019-04-08 20:07:40 +01:00
John Beard dd17f24c04 Libeval: consistent formatting for NaN
On some platforms like MSVC, NaN prints as "-nan(ind)". This
is a bit needlessly ugly, so print "NaN" on all platforms
consistently.

This fixes a test failure on MSVC.
2019-04-08 16:27:45 +01:00
Jeff Young 77f15eeeaf Support synchronous messaging over KIWAY EXPRESS.
This allows us to make the various netlist and pcb update routines
more atomic and less reliant on carefully sequenced asynchronous
messages.

This is also a prelude to adding support for footprint testing
without a netlist.
2019-04-08 13:26:09 +01:00
Seth Hillbrand 24bf838392 pcbnew: Allow arc editing via midpoint
This permits changing the radius of the arc by adjusting the center
point of the arc.  The arc end points are fixed in this operation.
2019-04-07 06:50:25 -07:00
Jeff Young 4a9f82109a Uniformly quote strings which may have user content.
Fixes: lp:1655193
* https://bugs.launchpad.net/kicad/+bug/1655193
2019-04-07 00:24:10 +01:00
Jeff Young 684bb62fd8 Escape slashes in labels and netnames.
Also re-allows spaces, as they can already come in through sheet
names.

Fixes: lp:1798621
* https://bugs.launchpad.net/kicad/+bug/1798621
2019-04-07 00:24:10 +01:00
Jeff Young 2aad4a5e57 Remove dead code from removal of eeschema legacy canvas. 2019-04-05 15:54:31 +01:00
Michael Kavanagh 1ccef6dc80 Invert maximum and minimum endpoints on color picker sliders
Put the maximum values at the "top" of the sliders.

Fixes: lp:1823196
* https://bugs.launchpad.net/kicad/+bug/1823196
2019-04-05 14:37:46 +01:00
John Beard 0f39d4907f Regenerate DIALOG_COLOR_PICKER_BASE wxFB files
This avoids the wxFB automatic changes hiding substantive changes
to be made in later commits.
2019-04-05 14:37:46 +01:00
Jeff Young 0fb956cdbe Apply OSX select-all-when-tabbing fix to other platforms.
Fixes: lp:1822890
* https://bugs.launchpad.net/kicad/+bug/1822890
2019-04-03 22:15:02 +01:00
Seth Hillbrand db0523626c GAL: Deal with thick circles
Both Cairo and OpenGL had issues (different, though) with circles that are
thicker in line width than they have radius.  This corrects the OpenGL
implementation (radius is calculated to the outer edge) as well as Cairo
(line width needs to be clamped to twice the radius)

Fixes: lp:1822765
* https://bugs.launchpad.net/kicad/+bug/1822765
2019-04-02 17:19:20 -07:00
John Beard 6f1c3f5ef8 Eeschema: construct simulator cursors on demand
Statically constructing wxCursors as used for the probe
and tune cursors crashes the qa_eagle_plugin test
instantly.

Fix this by introducing a new class CURSOR_STORE,
which allows to abstract the platform wierdness of wxCursors
and allow the simulator to laziliy init its own cursors
at runtime.

This code isn't properly tested, as these cursors are never
actually used. However, it does allow the eeschema unit test
to run.

Fixes: lp:1781191
* https://bugs.launchpad.net/kicad/+bug/1781191
2019-04-02 18:26:33 +01:00
jean-pierre charras 5ebec518d0 DIALOG_SHIM: disable a debug trace (a printf in debug build), now not very useful.
(It can be re-enabled easily)
2019-04-02 11:54:29 +02:00
jean-pierre charras 0d2dd48cad geometry/geometry_utils.cpp: Fix a minimal value (6) to calculate the segments by circle count to approximate a circle.
Use also this minimal value to calculate  the circle to poly correction factor
Also, remove a useless code.
2019-04-02 11:33:35 +02:00
Jon Evans 83c7e7fc65 New connectivity algorithm and bus upgrades
Bus upgrades: core new connectivity code

Bus upgrades: eeschema integration and modifications

Bus upgrades: eeschema dialogs

Bus upgrades: netlist export

Bus upgrades: file format changes
2019-03-31 19:53:41 -04:00
jean-pierre charras 7170720f3c Allow hatch pattern in filled zones
the filled areas can use a hatch pattern (crossing lines) using square holes.
The zone filler removes too small holes (truncated holes) from hatch pattern.
It avoid to create small holes when a hole pattern is truncated by the filled area base shape.
2019-03-31 08:21:40 +02:00
Seth Hillbrand c1c4a0925d sim: Prevent stepping
Introduced by 416e64a334.  The code
appears to have been stepped on purpose but this would be incorrect for
most applications.  There remains a good deal of cleanup in mathplot
available for the motivated dev.

Fixes: lp:1810311
* https://bugs.launchpad.net/kicad/+bug/1810311
2019-03-26 14:56:33 -07:00
John Beard aef369f4af Fix MSYS2 build breakage
wxPlatformInfo::Get() causes a linker error on Msys2.

Fix this by making common link wx explicitly, rather
than implicity via it's dependencies, which cause
wrong-order linker command lines on windows.
2019-03-26 10:49:19 +00:00
John Beard 567bdd9b9d Add configuration of Hi-DPI canvas scaling in OpenGL
First, add automatic detection of toolkit DPI scaling options. For now, this
is, in order,

* Check the GDK_SCALE option under GTK+ (users can set this to force the scaling)
* Check the value from WX's GetContentScalingFactor(). This will start to work
  correctly from WX 3.1 and GTK+ 3.10.

Then, add a user-settable override in the main prefs panel, next to the icon
scaling. This is independent of the icon scaling options.

DPI handling is performed in a standalone class, so they can be shared between
the prefs UI and the OpenGL backend easily. Also means Cairo could use the same
interface in future.

Also adjust the OpenGL grid drawing code to use the computed scale factor,
which avoids over-thick grids in scaled environments (the user can manually
thicken the grid if wanted).

Fixes: lp:1797308
* https://bugs.launchpad.net/kicad/+bug/1797308
2019-03-25 15:00:55 +00:00
jean-pierre charras ecb168f7a7 Add MD5_HASH::Format for debug purposes. 2019-03-21 11:42:15 +01:00
Seth Hillbrand 078320e2fb Unify and correct Autosave functions
Autosave was not working correctly, partly due to different
implementations in eeschema and pcbnew and partly due to a mistaken
refactor at some point during v5 development.  This unifies the expected
autosave prefix to _autosave- for both pcbnew and eeschema.  It also
unifies the expected suffix for the backup files to -bak.

Fixes: lp:1820433
* https://bugs.launchpad.net/kicad/+bug/1820433
2019-03-18 10:25:26 -07:00
jean-pierre charras fb0b1f2617 Print on Linux: use 600 DPI instead of the default 72 DPI (noticeable in Pcbnew) 2019-03-17 17:21:32 +01:00
Seth Hillbrand f96d16eba3 Restore LINK_MAP linker options
Removing invalid TO_LINKER missed a few segments where it was used.
This fixes the ability to enable link maps
2019-03-16 20:37:14 -07:00
jean-pierre charras a1ee5405aa Fix missing definition of std::hash<wxPoint> when using wxWidgets 3.1.x
it was not compiled for wxWidgets 3.1.x, but it does not exist in 3.1.x
2019-03-14 17:33:25 +01:00
Wayne Stambaugh aef0221d3b Replace isdigit() with wxIsdigit() when testing wxString characters.
This is a continuation of commit 8a03025a.  All known instances of
using isdigit() to test a character in a wxString have been replaced
by wxIsdigit().
2019-03-14 09:47:14 -04:00
jean-pierre charras 23086deccd Pcbnew fix: chamfered corners settings not copied with copy/paste pad properties
Fixes: lp:1819595
https://bugs.launchpad.net/kicad/+bug/1819595
2019-03-12 11:28:07 +01:00
jean-pierre charras 80cf4ec5cb Add comments about SVG import. 2019-03-11 19:25:52 +01:00
jean-pierre charras d259459a14 Pcbnew: add a new primitive pad shape: chamfered round rect pad.
Allows 0 to 4 chamfered corners, not only one.

A custom shape allow this kind of shape. However because it is a primitive,
it is easier to edit and it support thermal reliefs.
2019-03-11 10:26:15 +01:00
Seth Hillbrand 9bfce26ce7 Move env var substitution into GetAssociatedDocument
We always want the documents to have their variables replaced when
opening the associated file.

Fixes: lp:1819309
* https://bugs.launchpad.net/kicad/+bug/1819309
2019-03-10 08:39:36 -07:00
John Beard b6916c490c Pcbnew: allow tab traversal of footprint orientation text control
Disable the text update event for the orientation cutom value field before
updating it when the radio buttons are selected. This allows to use the
conventional EVT_TEXT handler, rather than KEYDOWN, which has two effects:

* Tabbing though the dialog no longer sets custom orientation
* Click-driven clipboard actions trigger the update correctly.

Introduce a helper function in validators.h to assist in updating
validated fields without triggering further events.

Fixes: lp:1819006
* https://bugs.launchpad.net/kicad/+bug/1819006
2019-03-07 20:27:04 +00:00
Seth Hillbrand a7f3462637 Fix compile issue on Linux 2019-03-04 06:11:44 -08:00
Jeff Young 49aa2503a0 Use recent wxWidgets headers (which are backward-compatible).
Fixes: lp:1817965
* https://bugs.launchpad.net/kicad/+bug/1817965
2019-03-04 12:26:30 +00:00
Jeff Young 69f003ba4a Remove previous cell selection fixes in favour of slow-click hack.
wxWidgets has several bugs that result in cell editors being closed
right after they're opened.  There are two wxWidgets hacks to
partially address this: the SetInSetFocus() hack, and a slow-click
hack.  We used to try and work-around these bugs ourselves for
single-click access, but this changelist moves those over to
wxWidget's slow-click hack.

Fixes: lp:1817965
* https://bugs.launchpad.net/kicad/+bug/1817965
2019-03-04 11:09:33 +00:00
Seth Hillbrand 8a03025ac9 strnumpcmp: Use wxstring functions for wxstrings
Fixes: lp:1818157
* https://bugs.launchpad.net/kicad/+bug/1818157
2019-03-03 19:55:50 -08:00
Seth Hillbrand 38be0fccb7 Symlib table: Need button handler for files
The folder button handler works will for footprint libraries but we
needed a specific class for the schematic libraries as well.

Fixes: lp:1818346
* https://bugs.launchpad.net/kicad/+bug/1818346
2019-03-02 20:05:28 -08:00
Wayne Stambaugh 8d26b07f67 Fix potential string iterator issue.
Added checks to StrCmpNum() function in common/sting.cpp to prevent
iterating past the end of the sting.  Also removed length of string
parameter since it did not seem to be used anywhere.

Fixes lp:1818157

https://bugs.launchpad.net/kicad/+bug/1818157
2019-03-02 08:20:53 -05:00
jean-pierre charras 140abd3952 Pcbnew: fix missing vertical grid lines in flip board view
Fixes: lp:1818154
https://bugs.launchpad.net/kicad/+bug/1818154
2019-03-01 11:09:40 +01:00
Seth Hillbrand 307a7154b6 DIALOG_SHIM: Enable Cancel button when editing
The cancel action was set for the escape key when editing the fields in
a dialog.  But when the action is a button, we need to ensure that the
escape id is set to ANY for processing.

Fixes: lp:1818056
* https://bugs.launchpad.net/kicad/+bug/1818056
2019-02-28 18:52:35 -08:00
Seth Hillbrand 13249b723b Handle excessive resize requests
For unknown reasons, GTK3 may send resize events when editing grid
fields.  This can cause the grid editor to exit, losing the focus and
overwritting the characters at the next input.

We avoid this by filtering the size events when the size doesn't change.

Fixes: lp:1817810
* https://bugs.launchpad.net/kicad/+bug/1817810
2019-02-27 11:32:30 -08:00
jean-pierre charras 29d7c0a1ec Excellon drill file: fix a very minor issue in a comment. 2019-02-27 10:41:55 +01:00
Seth Hillbrand 51fce4bad8 Force X11 on linux
Wayland is not yet compatible with wxWidgets (or rather the other way
around).  Until this happens, we must force the x11 compositor while
running.  Under wayland, this will map to the wayland-x11 compatibility
layer.

Fixes: lp:1816637
* https://bugs.launchpad.net/kicad/+bug/1816637
2019-02-26 08:51:12 -08:00
Seth Hillbrand 269f420f8d OpenGL: Create shaders for each GL
Fixes: lp:1817284
* https://bugs.launchpad.net/kicad/+bug/1817284
2019-02-25 09:31:42 -08:00
John Beard 787e410a55 Coverity fixes: lambda parameters by reference
For BUTTON_ROW_PANEL::BTN_DEF_LIST, the  button definition does not need to be
passed by value, by non-const reference avoids copies and this addresses the
Coverity warnings: 184130, 184134, 184140, 184167.

Also use a unique_ptr to clarify ownership sementics when handing widget
over to WX.
2019-02-25 13:37:51 +00:00
jean-pierre charras 4bf52b9266 Gerber output: add missing end of block to a structured comment in X1 format.
the comment line G04 #@! TF.CreationDate ... was missing the * (end of block) symbol.

Fixes: lp:1817547
https://bugs.launchpad.net/kicad/+bug/1817547
2019-02-25 14:16:36 +01:00
jean-pierre charras 8ad15b1d66 Symbol editor: fix issues related to axis not shown.
In Symbol editor, axis are always shown. However after switching the backend, axis were no longer drawn.
In Cairo engine, fix a bug preventing axis to be shown.
2019-02-24 12:56:17 +01:00
Seth Hillbrand 30612ca62d grid: Set grid to use integer pixels
Each dot is an integer number of pixels wide, so supporting 0.5 width
steps no longer makes sense.  We round up the existing settings to the
nearest integer and only allow integers in the dialog.

Fixes: lp:1816748
* https://bugs.launchpad.net/kicad/+bug/1816748
2019-02-23 19:27:45 -08:00
John Beard 82734e7116 Adjust tab ordering in some dialogs
Introduce a shortcut method to set tab ordering and use it in
the dialogs that override the tab traversal orders:

* Eeschema sheet properties
* Pcbnew Move exact
* Pcbnew Move relative

Also set some initial focus fields in the same dialogs.

Tidy a few includes.

Fixes: lp:1816009
* https://bugs.launchpad.net/kicad/+bug/1816009
2019-02-23 14:49:38 +00:00
Seth Hillbrand cb352bb029 Set Page Layout preview scale and clear bg
The preview scale is always in mil, so leave the scale factor as implied
as 1;  Draw a white rectangle for the page layout preview background.
2019-02-23 06:22:27 -08:00
Seth Hillbrand 82cbe9c995 cairo: Don't adjust grid point size
We shouldn't adjust the pixel size of the grid based on alignment in
GAL.  This creates artifacts on the screen at different zoom levels.
The pixel width is fixed by grid size preference

Also clean a left-over debug statement

Fixes: lp:1817377
* https://bugs.launchpad.net/kicad/+bug/1817377
2019-02-22 15:31:27 -08:00
jean-pierre charras 99153950ec Pcbnew, Ruler tool: protect unit display against erroneous translation of \"
A only one char is very hard to translate outside a context, so avoid to use it.

Remove also 2 "FIX ME" lines, now useless.

Fixes: lp:1817354
https://bugs.launchpad.net/kicad/+bug/1817354
2019-02-22 20:47:55 +01:00
Seth Hillbrand 2305c5458e cairo: Prevent arch shaking in pcbnew
Arc pixel adjustment needs to be limited to +/-1 pixel.  But making this
adjustment to nearby points and then using the projection to correct the
center point accumulates errors that are large for angles near 0 and
near 360.  This is a compromise that aligns _most_ arcs and provides
stable generation for all angles.

Fixes: lp:1817226
* https://bugs.launchpad.net/kicad/+bug/1817226
2019-02-21 19:59:34 -08:00
Seth Hillbrand dae7b03465 gal: re-enable arc outline mode
Fixes: lp:1816373
* https://bugs.launchpad.net/kicad/+bug/1816373
2019-02-21 10:52:54 -08:00
Seth Hillbrand 066b1782bb cairo: Fix grid display
Grid points were uneven in Cairo compared to OpenGL.  This standardizes
the functions for grid types and simplifies the code
2019-02-21 10:49:56 -08:00
Jean-Samuel Reynaud 75eda69218 Fix compilation issue on PPC64 2019-02-20 09:44:03 -05:00
Seth Hillbrand 235f2c7b39 cairo: Fix dotted grid color
Fixes: lp:1816774
* https://bugs.launchpad.net/kicad/+bug/1816774
2019-02-20 06:30:19 -08:00
Seth Hillbrand 203486638b Cleanup and clarify Cairo code 2019-02-19 20:51:11 -08:00
Seth Hillbrand 484c1f63ba gtk3: Force GTK2-style input handling
GTK3 provides for additional input devices via xinput2.  These include
touchscreens and continuous scroll devices.  But wxWidgets does not have
specialized handlers for these events, so they double up for some
devices.  Until wxWidgets allows us to handle these events, we specify
that the input handler should be the old-style GDK_CORE.
2019-02-19 11:03:20 -08:00
Seth Hillbrand 69c1263c02 GTK3: Force scrollbars visible
GTK3 does a fade in/fade out routine for scrollbars by default.  This
was problematic as it caused a cascade of full-screen repaint events on
each mouse event.  Instead of disabling scrollbars (which only helped
the full canvas), we force the old scrollbar behavior is environmental
variables.

Revert "gtk3: Remove scrollbars"

This reverts commit db43bd82a7.
2019-02-19 10:52:39 -08:00
Seth Hillbrand 7d1a5c425c Cairo: Treat no stroke as an even line width
Also protect against 180° angle issues in arcs
2019-02-18 18:00:38 -08:00
Seth Hillbrand 467d37e3f0 cairo: Fix pcbnew arc drawing
Chord should be positive 90° off the arc
2019-02-18 17:05:59 -08:00
Tomasz Włostowski 3b3c674c1a gal: opengl: use correct radius for graphical circles 2019-02-19 01:55:50 +01:00
Seth Hillbrand 3a0dbffa9e cairo: Minor tweak for angle transforms
Need to swap angles before transforming or we get bad comparisons when
wrapping.
2019-02-18 16:42:49 -08:00
Tomasz Włostowski 2151e195c7 gal: cairo: don't forget about the color when drawing grid points... 2019-02-19 01:24:26 +01:00
Tomasz Włostowski f66baaed8c gal: cairo: pixel-align arc endpoints, not center to avoid misalignment with adjacent line segments 2019-02-19 01:21:20 +01:00
Seth Hillbrand 4597979d18 cairo: Draw ovals with filled half-arcs
The circle at the end only ever looked right with 100% opacity.

Also fixes double-drawn arc fills in Cairo
2019-02-18 16:09:44 -08:00
jean-pierre charras 2dd653a327 WX_GRID: revert GetVisibleWidth() and add EnsureColLabelsVisible() to fix column label height of our wxGrid, for multiline column labels 2019-02-18 20:34:44 +01:00