Commit Graph

3819 Commits

Author SHA1 Message Date
Hal Gentz 416e64a334 Spice plot widget: more accurate rendering
Patch modifies the way graphs are displayed: instead of drawing one
point for each X coordinate, there is a line segment joining min and max
values for continuous graphs and all unique points are displayed for
discrete graphs.

Fixes: lp:1674143
* https://bugs.launchpad.net/kicad/+bug/1674143
2018-10-04 22:49:41 +02:00
Maciej Suminski 70c1de3275 Spice simulator: faster graph rendering
Graph rendering takes a lot of time, especially when there is a high number
of points to be drawn. The initial implementation drew all points/lines
even if the the coordinates were duplicates, in the new version duplicated
coordinates are skipped.

Fixes: lp:1674143
* https://bugs.launchpad.net/kicad/+bug/1674143
2018-10-04 22:39:38 +02:00
John Beard 3a9e7a496a Centralise some UI constants, use in hotkey lists
There are lot of places where constants are used in the KiCad UI
as "magic numbers". The most common one is "5", used in many
wxFormBuilder and manual UI constructions as the margin.

This commit provides a place for all UI to look up shared
constants and other functions, to help create a consistent UI using
functions that provide meaning and intent to these magic numbers.
2018-10-04 07:47:21 -04:00
John Beard 0be9667c96 Add read-only option for hotkey list, use for list dialog
This replaces the flat HTML list dialog with a read-only
version of the editor dialog in a pared-down dialog.

Fixes: lp:1778374
* https://bugs.launchpad.net/kicad/+bug/1778374
2018-10-04 07:47:21 -04:00
John Beard 7c2c8d307e Add tooltips to hotkey dialog buttons
THis is done in the generic widget, so other users can
benefit from it.
2018-10-04 07:47:21 -04:00
John Beard 23038b1550 Simplify hotkey editor widget
This is in preparation for making this widget optionally read-only.

Major changes:

* Construct panel in code, not with wxFormBuilder. This make's it
  easier to conditionally construct elements that won't be used
  in a read-only mode (e.g. the buttons).
* Use a generic "button row panel" widget for the buttons, as the
  sizing and layout logic is reusable in nearly all dialogs, and
  it's simplifies layout in the higher-level dialog widget. This
  widget is one example of many possible "reuable widgets".
2018-10-04 07:47:21 -04:00
John Beard 445a9fa963 Put cursor and pan control in libcommon/tool, enable in Gerbview
Put the cursor and pan control TOOL_ACTIONs in ACTION,
and refer to them in that way.

The handlers are currently identical in Pcbnew and Cvpcb,
and Gerbview (and all canvases) can benefit from them as well
if they are in libcommon. Also saves duplicated code.

Fixes: lp:1795855
* https://bugs.launchpad.net/kicad/+bug/1795855
2018-10-04 11:41:06 +02:00
Jeff Young c9ca1013b2 Make ModEdit and LibEdit library tree actions more consistent.
Adds Cut/Copy/Paste and Revert for footprints; introduces a new
shared Revert Changes? dialog; hooks up Add Library for footprints,
standardizes the Save As terminology.
2018-10-03 22:46:41 +01:00
John Beard 3da0d03c36 Centralise utilities for env variables.
This puts generic logic for KiCad environment vars in
one place.

Also updates the DIALOG_CONFIGURE_PATHS help to document
the new KICAD_USER_TEMPLATE_DIR and KICAD_TEMPLATE_DIR.
2018-10-03 11:53:10 -04:00
Jeff Young b5fd9e830f A bit more safety around disabling the event handler. 2018-09-29 23:05:43 +01:00
Jeff Young 2eea45b50c Go back to earlier strategy for net selector popup.
This version makes use of lots of things learned going down the
other rat hole.  Avoiding the wxComboFocusHandler is key, as well
as specifying using the AltPopupWindow.

The key handler is still tricky with respect to those platforms
that use native controls, but the starting-key strategy is similar
to the one used with wxGrid text editors.
2018-09-29 22:07:31 +01:00
Jeff Young 3c2aafd7b7 Move Edit Symbol References to standard text/button control. 2018-09-29 22:07:31 +01:00
jean-pierre charras 26838c6800 Pcbnew: Crash after running external plugin
Happens only in Opengl mode.
So enforce controls in 3 group function: DrawGroup, ChangeGroupColor, ChangeGroupDepth.

Fixes: lp:1795044
https://bugs.launchpad.net/kicad/+bug/1795044
2018-09-29 12:58:47 +02:00
Jeff Young 5843b1a6a1 Possible solutions to <enter> and keyboard activation on GTK. 2018-09-29 10:28:19 +01:00
Jeff Young 3f6819e592 Improve visiblity of net selector popup. 2018-09-28 22:39:42 +01:00
Jeff Young 0a43584c5c Another attempt to catch enter on GTK, and better button processing. 2018-09-28 19:36:50 +01:00
John Beard 704615721f Prevent segfault when undoing or resetting non-hotkey rows
This is caused by:

* Not checking the hotkey data is not null when performing a
  hotkey action
* Allowing hotkey actions on non-hotkey rows.

This fixes both of these, and adds an assert to warn if someone
does manage to fire a hotkey action on a non-hotkey row (but it
won't crash).

Fixes: lp:1794756
* https://bugs.launchpad.net/kicad/+bug/1794756
2018-09-28 08:28:30 -04:00
John Beard a294e8d6c4 Check for conflicts when reseting/undoing hotkey changes
It was possible to get conflicting hotkeys when undoing and resetting hotkeys
to defaults.

This uses the same logic as when setting hotkeys to avoid conflcits in these
other two cases.

Fixes: lp:1794730
* https://bugs.launchpad.net/kicad/+bug/1794730
2018-09-28 08:28:22 -04:00
John Beard 3283bd9fdc Mark modified hotkeys in the hotkey editor
THis uses a simple " *" suffix, as the wxTreeListCtrl-derivative
widget doesn't allow easy access to things like font style.
2018-09-28 08:28:16 -04:00
John Beard 9f38b70491 Add a filter box to hotkey dialog and filter using it
This uses a simple case-insensitive partial match, which is
a good start for the relatively limited number of hotkeys
generally present.
2018-09-28 08:28:04 -04:00
John Beard 4f0166e064 Add some hotkey store tests
This also adds some mocks to the libcommon test executable, which
hopefully will allow it to work with more of libcommon.
2018-09-28 08:27:57 -04:00
John Beard 1f2c8fa698 Separate storage at iteration of hotkeys from the HK list widget
This separates the "ground truth" store of hotkeys from what is shown
in the dialog. This will allow us to filter the displayed hotkeys
while keeping the same underlying data structures.

Now, the UI data items interact with an intermediate set of data, which
represents the "original" hotkey data, and the "changed" data. The
ultimate aim here is to allow UI elements to come and go, but the
hotkeys that are "in-edit" are preserved.

This also allows us to abstract some bookkeeping complexity
out of the WIDGET_HOTKEY_LIST class into a separate non-GUI
class.
2018-09-28 08:27:51 -04:00
Jeff Young 3927dc5820 More fixes for event handling in net selector. 2018-09-28 00:23:22 +01:00
Jeff Young 453dadbc3c Use EventFilter strategy on GTK; leave FocusLost for MSW & OSX. 2018-09-27 20:42:59 +01:00
Jeff Young 136525b870 Decrease list-item padding for GTK. 2018-09-27 18:58:32 +01:00
Jeff Young 5703060d87 Turn off escaping names for now.
Fixes: lp:1794816
* https://bugs.launchpad.net/kicad/+bug/1794816
2018-09-27 17:21:49 +01:00
Jeff Young 50b96b406f More net selector fixes. 2018-09-27 16:58:12 +01:00
Jeff Young 3ae049c729 Address some MSW issues in net selector. 2018-09-27 14:44:42 +01:00
Jeff Young f10635e8be More work on arbitrary characters in references, etc. 2018-09-27 14:44:42 +01:00
jean-pierre charras 4a553b6423 NET_SELECTOR fix: remove SetHint() because it does not work on Windows, that prevents filtering.
Replaced by a wxStaticText
Minor cosmetic fixes (on Windows)
2018-09-27 13:19:09 +02:00
Jeff Young 521183a587 Work in progress to allow arbitrary chars in references, etc. 2018-09-27 11:56:51 +01:00
Jeff Young eaf3d48260 Simplification of the net selector code to fix GTK issues. 2018-09-27 11:52:58 +01:00
Jeff Young d1e64919a7 Fix for GTK net selector popup border. 2018-09-26 22:50:27 +01:00
Jeff Young f7ffbb17bb Another try at the net selector popup. 2018-09-26 21:57:35 +01:00
John Beard 04a1084549 QA: Place UTF8 tests under Boost unit tests
This transfers the old #if'd-out tests in utf8.cpp into a
proper Boost unit test in /qa (run on `make test`).
2018-09-26 09:32:26 -04:00
Jeff Young 86b654e493 Hook up 3D viewer to common preferences.
Also removes nanny limits on text sizes.

Fixes: lp:1794093
* https://bugs.launchpad.net/kicad/+bug/1794093

Fixes: lp:1794345
* https://bugs.launchpad.net/kicad/+bug/1794345
2018-09-25 20:47:03 +01:00
Jeff Young 3cc6e0cf02 Fixes to NET_SELECTOR event loop for non-OSX platforms.
Don't assume events are always Pending().  Other platforms handle
idle events differently.
2018-09-25 17:56:38 +01:00
Jeff Young 37f7faf433 Move lock checks to CLIENT_SELECTION_FILTER.
Also checks render item visibility as well as layer visibility
when making selections.

Fixes: lp:1066220
* https://bugs.launchpad.net/kicad/+bug/1066220

Fixes: lp:1541756
* https://bugs.launchpad.net/kicad/+bug/1541756
2018-09-25 17:56:38 +01:00
Jeff Young 66848b9334 Show pads when parent footprint is selected.
Fixes: lp:1670090
* https://bugs.launchpad.net/kicad/+bug/1670090
2018-09-23 23:51:13 +01:00
Seth Hillbrand ae13e441af pcbnew: Yield in GTK for redraw
GTK uses a level of cooperative multitasking when dealing with
secondary event loops.  This gives the wm enough leeway to process the
redraw before returning to the secondary loop
2018-09-22 19:38:42 -07:00
Jeff Young cbce4d7663 Work around a stupid assert in GTK wxGUIEventLoop::Dispatch() 2018-09-22 19:38:42 -07:00
Jeff Young 0309228276 Don't allow drawing to a zero-height or zero-width GAL canvas.
Fixes: lp:1793913
* https://bugs.launchpad.net/kicad/+bug/1793913
2018-09-22 22:06:40 +01:00
Jeff Young 458af25282 Turn problematic code off for now.... 2018-09-22 17:54:59 +01:00
Jeff Young 4edf18b023 Attempt to fix Linux build issue. 2018-09-22 17:41:52 +01:00
Jeff Young 5974899fa5 Clean up file locations and names. 2018-09-22 16:23:13 +01:00
Jeff Young 666da3849b Make esc dismiss net and layer selector popups. 2018-09-22 16:23:13 +01:00
Seth Hillbrand f8784f30a8 Removing OpenMP
This commit finishes the removal of OpenMP from the KiCad codebase.
Removed in this commit are the OpenMP calls in 3d-viewer and
qa/polygon_triangulation as well as all references in CMakeLists.txt

std::thread is used instead for multithreaded computation
2018-09-21 12:44:20 -07:00
Fabio Rossi 21485e6f24 kicad_curl should be built only with BUILD_GITHUB_PLUGIN enabled 2018-09-21 12:44:20 -07:00
Jeff Young 42ab116bc2 Rewrite the NET_SELECTOR combobox in the hopes of better platform support. 2018-09-21 20:40:04 +01:00
Simon Richter e985f797c3 Return reference to current object from operator= 2018-09-21 05:03:30 -07:00