Commit Graph

2980 Commits

Author SHA1 Message Date
Michael d2e6f3a0e6 Improve edit menu and use common hotkeys 2018-02-15 16:46:17 +01:00
Michael Geselbracht 5d738dcb6d Coverity fix for libeval (CID #169327) 2018-02-15 15:43:12 +01:00
Maciej Suminski 570f4dd991 Coverity fixes
CIDs:
174166
174170
174171
2018-02-15 10:27:01 +01:00
jean-pierre charras 4012aa70da Fix a few minor Coverity warnings 2018-02-15 10:16:17 +01:00
Maciej Suminski 151021919e Tool Manager: yet another approach to handling tool view control settings
All calls to {save,apply}ViewControls() have been replaced with a new
method: setActiveState(). The advantage is that setActiveState() always
saves view controls settings to the tool that set them. As long
as setActiveState() is called every time there is a tool context
switch, the changes are kept up-to-date.

Fixes: lp:1748613
* https://bugs.launchpad.net/kicad/+bug/1748613
2018-02-14 15:34:05 +01:00
Jeff Young f68bf33cd3 Implement progress reporter for cvpcb footprint loading.
Fixes: lp:1676910
* https://bugs.launchpad.net/kicad/+bug/1676910
2018-02-13 20:21:38 -05:00
Jeff Young 4bae901dc8 Centralize zoom-to-fit code.
Fixes a bunch of errors:
- libedit and libbrowser would zoom to bounding box but centre on canvas
- libedit, libbrowser and gerbview didn’t take the scroll bars into account
- pcbnew didn’t take scroll bars into account or apply the 10% margin
- appending a board file would re-centre, but not re-zoom

Fixes: lp:1504302
* https://bugs.launchpad.net/kicad/+bug/1504302
2018-02-13 20:06:03 -05:00
Russell Oliver 34b52c91b7 Add empty eeschema page layout for Eagle schematic import.
Fixes: lp:1729722
* https://bugs.launchpad.net/kicad/+bug/1729722
2018-02-13 14:56:11 +01:00
Maciej Suminski 365ab99a6a GAL: update cursor position on panning and scrolling
Fixes: lp:1749082
* https://bugs.launchpad.net/kicad/+bug/1749082
2018-02-13 09:45:06 +01:00
Maciej Suminski 4f0c9b6b20 Fix double disambiguation menu when removing footprints
Second disambiguation menu was caused by another call to
SELECTION_TOOL::RequestSelection() meant to get the list of
connected tracks. When there were only footprints under the cursor,
it asked the user again to pick an item to remove.

Fixes: lp:1748521
* https://bugs.launchpad.net/kicad/+bug/1748521
2018-02-12 10:34:22 +01:00
Jeff Young 916f79d5a1 Performance fixes for the place footprint list all dialog.
Smartens the cache freshness checking, and adds checksums of
constituent-directory last-mod-dates to the footprint info
list.

Also inserts the dataPtrs into the list at the same time as
the text to keep wxWidgets from measuring the width of the
text twice (yes, really).  And converts the list to default-
column widths in case the wxWidgets patch is present to
greatly speed list creation (by not measuring all that text).

On my machine drops the first-load time from 4s to 2.5s and
the subsequent-load times from 2.5s to < 1s.  With the
wxWidgets patch subsequent-loads become near-instantaneous.
2018-02-11 11:51:48 -05:00
Maciej Suminski c39fd46c07 PROGRESS_REPORTER: code formatting 2018-02-09 14:20:25 +01:00
Tomasz Włostowski 271363f822 router: support for board outline 2018-02-06 09:43:56 +01:00
Tomasz Włostowski 2faf1a1ed3 Initial support for keepout zones in the P&S router. 2018-02-06 09:43:56 +01:00
jean-pierre charras 821668d96c rename class_collector.h to collector.h 2018-02-04 10:49:37 +01:00
jean-pierre charras 1858852f57 rename files 2018-02-02 21:57:12 +01:00
Maciej Suminski 95864780e2 Fix cursor freezes in GAL
Launching right click context menu overrides the cursor position, so all
actions executed by the tools will be performed in the right click
position. It created an issue, as the overridden cursor settings were
saved into wrong context if there was another tool activated in the
meantime.

Current implementation saves cursor settings for all tools and restores
them once the right click context menu disappears.

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

Fixes: lp:1746507
* https://bugs.launchpad.net/kicad/+bug/1746507
2018-02-02 19:08:05 +01:00
jean-pierre charras 39b4afecfa fix code after file renaming 2018-01-31 09:24:02 +01:00
jean-pierre charras 32aedc99b7 rename files 2018-01-31 09:24:00 +01:00
jean-pierre charras b43dc7954c fix code after renaming files 2018-01-30 15:34:09 +01:00
jean-pierre charras 5d72aebd22 Fix code after renaming files 2018-01-29 16:40:22 +01:00
jean-pierre charras bc76ec4d67 Rename files according to the name of classes they are defining 2018-01-29 16:40:20 +01:00
jean-pierre charras d0754acf00 Fix code after renaming files 2018-01-29 11:37:29 +01:00
jean-pierre charras 398f6d7b32 rename a few files 2018-01-29 09:50:58 +01:00
jean-pierre charras d44494beda Update code after file renaming 2018-01-29 09:39:49 +01:00
jean-pierre charras fa10e1b7fe rename a few files 2018-01-29 09:39:47 +01:00
jean-pierre charras 4c5bd01887 Rename a few files 2018-01-28 22:02:31 +01:00
jean-pierre charras 5868202c28 rename files, mainly files for plotter control 2018-01-28 18:13:27 +01:00
Martin Sivak d5cdd78062 eeschema: keystroke zoom should obey disabled centering
Keystroke zoom (F1/F2) always centered the screen, because it
was handled as ID_POPUP_ZOOM_IN event. Mousewheel scrolling
was ok, because it is handled using different event based
on the configuration.

This patch introduces special event ids for keystroke
zooming that are then properly translated to either
ID_POPUP_ZOOM_IN or ID_OFFCENTER_ZOOM_IN depending
on the configuration.

The same issue is fixed for legacy canvas pcbnew.

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

Signed-off-by: Martin Sivak <mars@montik.net>
2018-01-27 20:20:32 -05:00
Jeff Young 7a28f3d4cf Implement undo/redo for origins in legacy
PICKED_ITEMS_LIST knows the architecture of the undo commands so
that it can delete those ITEMs which it owns.  This represents poor
encapsulation so instead of adding yet another case, I added a
UR_TRANSIENT item flag which is set by callers whenever they create
new objects to “give to” the undo/redo stack.  This allowed some
cleanup of other code, but cleaning up UR_DELETE and UR_WIRE_IMAGE
will be a bigger task and have to wait for another day.

Fixes: lp:1542018
* https://bugs.launchpad.net/kicad/+bug/1542018
2018-01-27 19:51:44 -05:00
Jeff Young 4784ee7fe4 Implement undo/redo for drill and grid origins.
The undo/redo operations are essentially the same as for
UR_CHANGED: we store both the origin marker item and a copy
of it and flip back and forth between the two.  This also
required the implementation of clone() for the markers.

The ORIGIN_VIEWMARKER is moved from being a subclass of
EDA_ITEM to BOARD_ITEM to facilitate the use of a UR_CHANGE-
like implementation without having to know the internals
of the ORIGIN_VIEWMARKER.

In the command processors, the setting of the origins is
broken into two parts: one for UI-level access which includes
setting up undo, and one for low-level access which does not.
The undo/redo code itself of course uses the lower level.

Fixes: lp:1542018
* https://bugs.launchpad.net/kicad/+bug/1542018
2018-01-27 19:40:51 -05:00
Maciej Suminski b8ecc95d9c Forward context menu events to the tool that created the menu
It fixes the case when a tool sets up a menu and starts its event loop
waiting exclusively for menu events. If none arrived, the tool was stuck
in the loop forever.

Fixes: lp:1744915
* https://bugs.launchpad.net/kicad/+bug/1744915
2018-01-26 15:53:52 +01:00
Seth Hillbrand 7a2d9dff62 Sets additional conditions for when a wire is trimmed
This adds a set of conditions that will prevent a wire from being
automatically trimmed.  Wires that are currently being moved or are
newly created or are explicitly avoided will not be removed.  This also
adds a function to set a flag on items in a block.

Fixes: lp:1744632
* https://bugs.launchpad.net/kicad/+bug/1744632
2018-01-24 19:47:14 -05:00
jean-pierre charras 270a63daac DRAWSEGMENT, S_POLYGON shape: remove useless copies or conversion to std::vector<wxPoint> of SHPE_POLY_SET polygon shape.
Rename GetPolyPoint() to BuildPolyPointsList(), because GetPolyPoint() looks like an accessor, but it is not an accessor.
(Using it as accessor can creates a *very long calculation time* for very basic access to polygon vertices)

Fixes: lp:1745050
https://bugs.launchpad.net/kicad/+bug/1745050
2018-01-24 14:22:43 +01:00
Maciej Suminski 121e670508 TEXT_CTRL_EVAL: Close the parent dialog after pressing Enter
Fixes: lp:1744721
* https://bugs.launchpad.net/kicad/+bug/1744721
2018-01-23 11:49:39 +01:00
Maciej Suminski da305e7750 Move SwitchCanvas() implementation to EDA_DRAW_FRAME
Share more code between pcbnew and gerbview. Fix warnings regarding
shadowing EDA_DRAW_FRAME::SwitchCanvas().
2018-01-22 09:06:55 +01:00
jean-pierre charras 1db14d44b7 Better calculation of polygon clearance area of oval pads. Wip. 2018-01-20 19:34:50 +01:00
Jeff Young cba430deab Fix undo/redo and revert for libedit name changes and aliases
Three interrelated issues:
1) Implement an undo/redo type for renames so that we know to delete
the old lib entry and add a new lib entry
2) When doing so (for the undo/redo OR the original edit), we must
make a copy of the 'original' LIB_PART which is used for revert, and
hand it to the new lib entry
3) When comparing a modified component tree item with the current item
we must also check for aliases.

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

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

Fixes: lp:1744373
* https://bugs.launchpad.net/kicad/+bug/1744373
2018-01-20 11:20:22 +01:00
jean-pierre charras 2e83103c3d WIDGET_NET_SELECTOR: speedup the net list creation.
Add comments and better names for variables.
2018-01-19 11:01:42 +01:00
Maciej Suminski d87a7ae58e Fallback to Cairo when OpenGL is not supported
Fixes: lp:1741787
* https://bugs.launchpad.net/kicad/+bug/1741787
2018-01-18 10:17:06 +01:00
Jon Evans b21f301097 Defer canvas type setting save until destruction of EDA_DRAW_FRAME
Fixes: lp:1741787
* https://bugs.launchpad.net/kicad/+bug/1741787
2018-01-18 10:17:06 +01:00
jean-pierre charras 47d392d83e Fix incorrect name (typo) of a method. 2018-01-18 10:11:45 +01:00
jean-pierre charras 6014307d06 Pcbnew, DRC dialog: Fix a few issues:
Gal mode: graphic cross-air cursor moved on items when clicking on & DRC error, like in legacy mode.
Make popup menu shown when right clicking on a DRC error item working.
2018-01-17 15:36:04 +01:00
Maciej Suminski d85cf732b6 TEXT_CTRL_EVAL: Evaluate expressions when Enter key is pressed
Fixes: lp:1741320
* https://bugs.launchpad.net/kicad/+bug/1741320
2018-01-16 14:53:13 +01:00
jean-pierre charras 433b2bff40 Add comments in progress_reporter.h; Remove unused parameter in Fill_All_Zones and remove empty file. 2018-01-16 10:22:25 +01:00
Jon Evans 6eb5733a0b LSET::UIOrder and LSET::Technicals now match layer widget order
Fixes: lp:1673792
* https://bugs.launchpad.net/kicad/+bug/1673792
2018-01-15 10:08:30 +01:00
Oliver 195b85b0c5 Cleanup of KiCad Icons
Major cleanup of many icons (started as a simple effort to tweak libedit and modedit icons)
Ref: https://lists.launchpad.net/kicad-developers/msg32860.html
* Each application icon has been updated
* Consolidated icon "modifiers" across many icons
* Replaced confusing arrows with "load" and "save" icons
* Slight code updates to reference correct icons
* Consolidate multiple representations of single icon type(s)
2018-01-12 14:06:45 -05:00
jean-pierre charras 79a9f401a3 Fix a minor issue in pad editor dialog: in GAL mode, the pad was sometimes shown in outline mode, sometimes in filled mode
Fixes: lp:1740668
https://bugs.launchpad.net/kicad/+bug/1740668
2018-01-12 19:58:32 +01:00
Jon Evans 5fd1236d7a Use worksheet bounding box when the board is empty
Fixes: lp:1742140
* https://bugs.launchpad.net/kicad/+bug/1742140
2018-01-11 11:28:19 +01:00
jean-pierre charras 47dfabc6c8 Add size control to HTML_MESSAGE_BOX. Fix incorrect default size of a few dialogs.
Clean code: remove useless code and not used parameters.
2018-01-11 10:48:52 +01:00