Commit Graph

94 Commits

Author SHA1 Message Date
Tomasz Włostowski 4bf90f9717 WX_PROGRESS_REPORTER: fixed windows build error 2017-12-05 14:54:57 +01:00
Tomasz Włostowski 4facfd846a WX_PROGRESS_REPORTER: fix assert warnings 2017-12-05 14:54:57 +01:00
Tomasz Włostowski 316ddadec1 pcbnew: Optimized zone filling algorithm. 2017-12-05 14:54:57 +01:00
Maciej Suminski 1c4056e17a TEXT_CTRL_EVAL: wxTextCtrl wrapper supporting math expression evaluation 2017-11-24 21:15:40 +01:00
Maciej Suminski 579d3f478d Renamed WX_UNIT_BINDER to UNIT_BINDER and moved to common/widgets
WX_ prefix should reserved for classes provieded by wxWidgets.
2017-11-24 21:15:40 +01:00
jean-pierre charras 9723b0d844 Fix a few minor coverity warnings (not initialized members) 2017-11-11 07:25:00 +01:00
Marvin Schmidt 69974b73db Remove some extra semicolons 2017-11-09 19:52:18 +01:00
Maciej Suminski 5eb56dd8b0 Coverity fixes
CIDs:
102571
168696
168701
168704
168706
168708
168710
168713
168716
168717
2017-11-01 10:24:26 +01:00
jean-pierre charras acccb10ca5 Minor fix: Fix a incorrect min size of COLOR4D_PICKER_DLG on Linux+KDE 2017-10-04 16:35:57 +02:00
jean-pierre charras 5aeb6129ca Fix a bug in KIGFX::COLOR4D ctor: . The alpha channel (opacity) was set to 0. this is a mistake. It is now set to 1.0
Fixes lp:1718389
2017-09-29 14:52:51 +02:00
Kevin Zheng 6487ec5c21 Reword hotkey reset menu items
Fixes lp:1717637
2017-09-26 09:21:48 -04:00
jean-pierre charras 758445e33e Fix a compil warning and a wxASSERT in COLOR4D_PICKER_DLG_BASE 2017-08-28 17:40:26 +02:00
jean-pierre charras 84f1c8e0c6 color4Dpickerdlg.cpp: avoid selecting accidentally a new color when the mouse cursor is inside a color map when opening the dialog 2017-08-12 07:52:15 +02:00
jean-pierre charras 4e96f9990d Use the new color4Dpicker to choose a color in Eeschema.
However, the opacity is not modifiable because the wxDC used in Eeschema does not know the alpha channel.
2017-08-06 10:42:11 +02:00
jean-pierre charras e10f0c729b Fix minor compil warnings 2017-07-30 14:24:21 +02:00
Tomasz Włostowski b964569db7 pcbnew: enable net selection combobox in Track/Via properties dialog 2017-07-27 16:21:54 +02:00
jean-pierre charras cb75b72978 Refinements if new color 4D selector 2017-07-19 11:26:28 +02:00
jean-pierre charras 5f4599fb56 Add a new color selector, to adjust color selection for GAL mode, with support of opacity (alpha channel)
Pcbnew: save opacity value in color config, and keep it when switching between legacy and gal mode.
2017-07-18 19:07:47 +02:00
Maciej Suminski 3afef4e19d Display an error when pcbnew.kiface is not available for FP selector
DIALOG_COMPONENT_CHOOSE displays footprint preview when pcbnew kiface
is available, but it crashed when it was not in the same directory
as the executable. Now it displays an error message that allows the
user to quickly identify the problem.

Fixes: lp:1695005
* https://bugs.launchpad.net/kicad/+bug/1695005
2017-06-30 23:01:21 +02:00
jean-pierre charras 0719b99ad8 Minor enhancement in color selection on Windows 2017-06-24 10:45:26 +02:00
jean-pierre charras 80371134d7 better fix than commit 6c083ebf4c, because the issue was existing in other dialogs
Fix incorrect frame deletion, only noticeable when eeschema is run in stand alone mode.
After selecting a footprint using the footprint viewer, the application cannot be closed.
Reason:
the footprint viewer ctor creates an instance (not shown) of a FRAME_PCB.
Unfortunately, this pcb frame was not deleted by Eeschema, in stand alone mode,
preventing the application to be closed because a frame was still active after closing the schematic editor frame.
Now the footprint viewer ctor delete this instance after use, if it was not previously existing.
2017-04-13 18:28:16 +02:00
jean-pierre charras 6c083ebf4c FOOTPRINT_SELECT_WIDGET: fix incorrect frame deletion, only noticeable when eeschema is run in stand alone mode.
After selecting a footprint using the footprint viewer, the application cannot be closed.
Reason:
the footprint viewer ctor creates an instance (not shown) of a FRAME_PCB.
Unfortunately, this pcb frame was not deleted by Eeschema, in stand alone mode,
preventing the application to be closed because a frame was still active after closing the schematic editor frame.
2017-04-13 15:17:30 +02:00
Chris Pavlina 849b3c2a4b Add footprint select dropdown to component chooser, serious refactoring
- DIALOG_CHOOSE_COMPONENT has footprint select widget
- FOOTPRINT_SELECT_WIDGET
- FOOTPRINT_CHOICE widget (customized wxComboCtrl)
- FOOTPRINT_FILTER class
- FOOTPRINT_INFO rework:
    - FOOTPRINT_ASYNC_LOADER to load without freezing UI
    - Rewrite loader threads as queue-driven thread pool
    - Make FOOTPRINT_INFO available via kiway
- FP_LIB_TABLE::PrefetchLib
- Access to global fp-lib-table via kiway
- SYNC_QUEUE threadsafe queue template
- Remove KICAD_FOOTPRINT_SELECTOR build option
2017-03-24 09:20:27 -04:00
John Beard b8edecc10f Move cursor shape flag into GAL settings
The motivation here is to concentrate display options in the GAL display
settings, ready for removal of legacy canvases. Instead of having the
property as a member of the DRAW_FRAME, with the GAL canvas retreiving
it from there, it is now in the GAL_DISPLAY_OPTIONS struct, and both GAL
and legacy get it from there.

The options for setting cursor shape are then moved out of the general
options dialog, and into the GAL display options widget, where they can
be used in all GAL-aware programs.

GAL cursor shape works on GAL, but not legacy, so the option is now
available on OSX (but only affects GAL, and is labelled as such).
2017-03-22 10:24:48 +01:00
John Beard b4a4748672 Move sketch mode area in pcbnew display options
This gives a bit more space to the GAL options in the left panel

Also tidy up some code style and unnecessary default arguments in the
GAL display planel widget.
2017-03-22 10:24:48 +01:00
John Beard 78a5185857 Allow GAL cursor to be always displayed
A new items is added to the GAL display options (and the dialog), and a
hotkey (Ctrl+Shift+x) is added to toggle it.

Fixes: lp:1673633
* https://bugs.launchpad.net/kicad/+bug/1673633
2017-03-22 10:04:56 +01:00
John Beard 996cba7e7f Fix GAL display properties spin buttons on Windows 2017-03-16 10:40:06 -04:00
John Beard f2aa4d2911 Make GAL options panel a reusable panel
The primary motivation here is to allow other GAL canvas users (eg
Modedit, and soon Gerbview) to be able to easily modify GAL canvas
options.

For now, this doesn't change the display properties dialog in
appearance, but if more GAL options are added, it might need a bit of
tweak and maybe tabs or similar, like Eeschema preferences.
2017-03-16 08:01:26 -04:00
Maciej Suminski fe4f02f5b9 Coverity fixes
CIDs:
- 153097
- 157120
- 157119
- 155148
- 155146
- 153103
- 153099
- 153095
- 153087
- 153086
2017-03-11 22:20:08 +01:00
Chris Pavlina bbaa29fbc4 Refactor FOOTPRINT_PREVIEW_PANEL
- Pull out compound widget bits into FOOTPRINT_PREVIEW_WIDGET
- Move all pcbnew-specific bits *inside* pcbnew; implementation should
  be private for users
- Make a few class members and inner types private
2017-03-10 23:26:45 -05:00
Maciej Suminski f46961d003 Fix a memleak in COLOR_SWATCH 2017-03-10 17:56:41 +01:00
Simon Richter bb61cd5a50 Add missing header
color_swatch.cpp uses std::unique_ptr
2017-03-08 10:39:11 -05:00
John Beard 4547b2e26d Don't init wxBitmaps before GUI is ready
Init'ing static wxBitmaps in the global scope happens before the GUI is
ready, which segfaults, at least on GTK+. This can happen in, for
example, the Python module. In normal use, the singletop/kicad
loader has initialised the GUI first, so it doesn't manifest there.
2017-03-01 13:28:10 +01:00
John Beard 1d039cb4c1 Break row indicators out to own class
The introduces INDICATOR_ICON, which is a very simple class holding a
bitmap that can toggle on or off.

The ICON_PROVIDER class then provides icons to INDICATOR_ICONS, which
means the class can be used for more than just row indicators.

A default row icon provider is also provided for use in the standard row
selector.
2017-03-01 09:44:41 +01:00
John Beard b8d0b0d7be Move layer/render swatches to own class
This introduces COLOR_SWATCH, which is a reusable
widget that shows a color swatch and can invoke the colour picker
when duble/middle clicked.

It uses it's own wxCommandEvent to signal the change.

This makes the layer widget simpler internally, and also allows other
code to show identical swatches if needed.
2017-03-01 09:44:41 +01:00
Maciej Suminski 9ead2b068b Fixed crash when placing a component in standalone eeschema
Fixes: lp:1668157
* https://bugs.launchpad.net/kicad/+bug/1668157
2017-02-27 10:29:53 +01:00
Chris Pavlina 23d4da9e49 Optimize TWO_COLUMN_TREE_LIST column sizing
This was particularly slow for very long lists on macOS.
2017-02-24 12:51:53 -05:00
Chris Pavlina 2e07d83461 Reduce footprint preview flickering in component selector 2017-02-19 14:54:36 -05:00
Chris Pavlina 3d88cc2a36 Rename method for consistency with similar class
FOOTPRINT_PREVIEW_PANEL::AddToPanel -> InstallOnPanel
2017-02-19 07:53:02 -05:00
Chris Pavlina fb6bf0c861 Fix SetColumnWidth() assertion in TWO_COLUMN_TREE_LIST
Fixes: lp:1665982
* https://bugs.launchpad.net/kicad/+bug/1665982
2017-02-19 06:38:53 -05:00
Chris Pavlina 2632b1d1a0 Revamp component chooser and add footprint preview
This commit brings several changes:

- Add a footprint preview pane to the eeschema component selector
- Upgrade component list to wxTreeListCtrl
- Factor out wxTreeListCtrl subclass TWO_COLUMN_TREE_LIST which
  patches a column size bug
- Linkify datasheet URL in info pane
2017-02-18 21:39:55 -05:00
jean-pierre charras a9fbedfb12 More Coverity warnings fixes. 2016-12-30 14:36:23 +01:00
jean-pierre charras dec2d6e8cc Fix a few Coverity warnings. A bit of clean code in export_vrml.cpp. 2016-12-30 12:40:05 +01:00
jean-pierre charras 5d7d210f28 Simulator, plot panel: fix incorrect calculation of the vertical size of the traces when resizing the simulator frame 2016-11-28 15:37:00 +01:00
jean-pierre charras c225af747f mathplot: fix a bug and remove unused variables ( it fixes a few compil warnings) from Coverity analysis.
Uncrustify mathplot.h and fix a few coding style issues.
2016-11-28 14:18:22 +01:00
Maciej Suminski 1420a0179f Removed deprecated pragmas to mute warnings 2016-09-26 14:53:43 +02:00
jp-charras 26b1c732de Simulator: add simulator icon, and colored icons to identify more easily traces in trace list and cursor list. 2016-08-29 11:39:54 +02:00
Maciej Suminski 9714ece53f Initialize bestStep (wxMathPlot) 2016-08-15 10:53:36 +02:00
Simon Richter eec632a651 Remove definition of log10(double) in wxMathPlot widget 2016-08-15 10:19:42 +02:00
jean-pierre charras 42f9be4019 uncrustify mathplot.cpp, make debug strings not translatable, and remove not compilable debug lines (due to changes in internal code). No actual change in code. 2016-08-12 10:10:33 +02:00