Commit Graph

271 Commits

Author SHA1 Message Date
Jeff Young 122d7ed3b3 Improve document file handling.
Fixes: lp:1779512
* https://bugs.launchpad.net/kicad/+bug/1779512
2018-08-14 13:54:04 +01:00
jean-pierre charras 3eb3db02c3 Cvpcb, DISPLAY_FOOTPRINTS_FRAME: add measurement and zoom to selection tools. 2018-08-09 11:15:43 +02:00
Jeff Young 5f3ee1e7ce More g_UserUnit erradication.
(cherry picked from commit 3f08780)
2018-07-17 15:12:31 +01:00
Jeff Young 7841f8a466 Unified preferences dialog framework.
(cherry picked from commit 8ee3e77)
2018-07-17 15:11:17 +01:00
Jeff Young a39fb03822 Remove some references to g_UserUnit
(cherry picked from commit 614d832)
2018-07-17 15:09:56 +01:00
Carsten Schoenert 9a13dd48af fix misspelled 'Toogle' -> 'Toggle'
A small typo fixup for misspelled word Toogle.
2018-07-11 10:34:53 -04:00
Jeff Young 79e0bb08d0 Architecturally-simpler fix for grid context menu unit changes.
Fixes: lp:1777519
* https://bugs.launchpad.net/kicad/+bug/1777519
2018-06-20 16:54:24 +01:00
Jeff Young 3c7b91b96a Always create grid menu so units are up-to-date.
Fixes: lp:1777519
* https://bugs.launchpad.net/kicad/+bug/1777519
2018-06-19 10:52:36 +01:00
jean-pierre charras 5411b951ae Minor compil warning (signed/unsigned compare) fix 2018-06-13 08:05:10 +02:00
Jeff Young cd5f727880 Fix off-by-1 errors in zoom menus & use zoom steps in GAL canvas.
Also bumps the maximums a bit (at user request).

Fixes: lp:1773215
* https://bugs.launchpad.net/kicad/+bug/1773215
2018-05-25 13:01:58 +01:00
Maciej Suminski dfcdfe91fa Fixed the TOOL_STATE::idle field setting condition
The tools were being set as idle, whenever an event handler execution
finished (via TOOL_MANAGER::finishTool()). Such approach does not take
into account cases when a tool is active and receives an event causing
another event handler of the same tool to run. When this happend, the
tool has been incorrectly set as idle when the second handler finished
its execution.

In a particular case, invoking the router settings dialog caused the PNS
router to be incorrectly detected as inactive in
EDIT_TOOL::invokeInlineRouter(). Due to that, ROUTER_TOOL::CanInlineDrag()
requested a selection that required disambiguation menu for items
that were modified by the router, but not yet committed. After the drag
tool had finished, the disambiguation menu was eventually shown
with items existing only in the undo buffer. Removing such item lead to
track DLIST corruption, effectively erasing all tracks.

Fixes: lp:1767826
* https://bugs.launchpad.net/kicad/+bug/1767826
2018-05-17 16:24:13 +02:00
jean-pierre charras 319908b7f4 fix a compil issue. 2018-04-24 15:20:35 +02:00
Maciej Suminski 143d580596 Fixed relative coordinates reset when a tool forces the cursor position
Fixes: lp:1759044
* https://bugs.launchpad.net/kicad/+bug/1759044
2018-04-24 12:56:19 +02:00
Wayne Stambaugh a1acec5f13 Revert broken hotkey fix.
The hotkey fix committed in 53b1ec81 broke non-us keyboards.  Change the
hotkey help hotkey from '?' to Ctrl+F1 to prevent the hotkey list dialog
from being shown when placing a bus wire junction in Eeschema and when
changing the track posture in Pcbnew.  This is still broken in the GAL
framework.
2018-04-14 08:24:25 -04:00
Wayne Stambaugh 81843c37a4 Organize trace debugging code for ease of maintenance. 2018-04-13 09:59:01 -04:00
Maciej Suminski 0d8692da20 Changed ACTION_MANAGER assert() calls to wxASSERT()
wxASSERT(), contrary to assert() does not terminate the program when
triggered. As assertions in ACTION_MANAGER are not critical and should be
treated as warnings - there is no need to close the program.
2018-04-12 08:47:09 +02:00
Carsten Schoenert a11714b1a4 fix misspelled 'an other' -> 'another' 2018-04-08 13:24:37 -04:00
Wayne Stambaugh 53b1ec8146 Fix track posture hotkey bug on windows.
The change track posture hotkey '/' was getting interpreted as the show
hotkey list shortcut '?' on windows.  This fix is temporary hack to fix
the problem which much more involved than the simple #ifdef/#endif used
to fix this issue.

Add key code tracing to help analyze key codes for future development.
2018-04-02 18:05:37 -04:00
Jeff Young 8b94606fb5 Promote selection up context menu hierarchy.
This is so that tools checking for a selected item won't think
the menu has been cancelled if the selection was in a submenu.

Fixes: lp:1758372
* https://bugs.launchpad.net/kicad/+bug/1758372
2018-03-26 20:35:49 +01:00
Wayne Stambaugh c8c5b5da07 Fix zoom to selection in bug in gal canvas. 2018-03-25 16:12:56 -04:00
Tomasz Włostowski af7064ef89 pcbnew: synchronize zone visibility view menu entries with the toolbar buttons 2018-03-03 17:38:28 +01:00
Jon Evans be8bb24390 Make all new hotkeys editable; label some GAL-only hotkeys
Fixes: lp:1751183
* https://bugs.launchpad.net/kicad/+bug/1751183
2018-02-25 17:57:36 -05: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 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
Maciej Suminski d3998a2d08 Do not override cursor position when context menu is active
It affected just started tools that did not have cursor settings
stored, so could not be reverted after the context menu is gone.

Fixes: lp:1748613
* https://bugs.launchpad.net/kicad/+bug/1748613
2018-02-12 11:21:07 +01:00
Jeff Young ed127e866a Fix bone-headed mistake in selection highlighting patch.
(__UNIX__ *is* defined for Mac/OSX)
2018-02-12 08:41:37 +01:00
Jeff Young a7cdd94212 PCBnew clarify selection menu doesn't highlight individual selection on Windows
(Use Mac solution to disambiguation highlighting on MSW).

Fixes: lp:1594029
https://bugs.launchpad.net/kicad/+bug/1594029
2018-02-11 13:29:45 +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 8552f3fedf fix code after renaming files 2018-01-29 22:00:44 +01:00
jean-pierre charras 5d72aebd22 Fix code after renaming files 2018-01-29 16:40:22 +01:00
jean-pierre charras d0754acf00 Fix code after renaming files 2018-01-29 11:37:29 +01:00
Jon Evans b547c5cdf0 Reapplied: Save view control settings before dispatching new tool events
Unintentionally removed in b8ecc95d.
2018-01-26 19:23:08 +01: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
Jon Evans 11fa7cdaf3 Save view control settings before dispatching new tool events
Fixes: lp:1741357
* https://bugs.launchpad.net/kicad/+bug/1741357
2018-01-15 10:46:09 +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
Camille f5f7ba4746 Fix loop variable copy in for-range loop, use const reference instead 2018-01-09 19:18:44 -05:00
Camille 9ff66a5274 Fix unnecessary value parameter detected by clang-tidy. - Replace value parameter by const reference parameter or move-assignement in some cases 2018-01-09 18:55:51 -05:00
Jeff Young f76e7568bc Don't warp cursor if the disambiguation menu is cancelled.
Also fixes the empty-selection-context-menu coming up after
a cancelled disambiguation menu.

Fixes: lp:1738339
* https://bugs.launchpad.net/kicad/+bug/1738339
2018-01-02 13:01:55 -05:00
Jeff Young 833534537d Fix touchpad tapping.
Don't apply missing-mouse-up logic to mouse-down events.  The
logic depends on mouse-state, and the OS-synthesized mouse-up
and mouse-down events from a tap don't contain any state.

Fixes: lp:1737010
* https://bugs.launchpad.net/kicad/+bug/1737010
2017-12-15 16:59:19 -05:00
Simon Richter a9ccf1161b Fix quotes in UI messages
This replaces all single and angle bracket quotes in UI messages with
double quotes, for consistency.

Sorry to all translators.
2017-12-15 07:33:07 -05:00
jean-pierre charras c18b638c17 Cosmetic enhancement in GAL: disambiguationMenu: add icons in menuitems, like in Legacy mode. 2017-12-13 19:42:33 +01:00
Jeff Young dc9d17100b Fix update of brightened objects on OSX.
The OSX implementation needs to be poked to update the
brightening / unbrightening during running of the
disambiguation menu.  (FWIW, now that I've finally seen
it in action, it's a REALLY cool feature.)

Fixes: lp:1715440
* https://bugs.launchpad.net/kicad/+bug/1715440
2017-12-13 11:31:24 +01:00
Jon Evans 9e6956c9ac Reset tool transitions even when already active (Fixes lp:1733224) 2017-11-28 09:24:29 +01:00
Maciej Suminski 40129d2244 Fixed cursor freeze after canceling a tool with cursor over a drag point
Fixes: lp:1716702
* https://bugs.launchpad.net/kicad/+bug/1716702
2017-11-08 11:41:45 +01:00
Maciej Suminski f5c561e281 Fix build error due to missing optional::value_or() 2017-11-04 11:29:55 +01:00
Tomasz Włostowski 9932ff32ae refactoring: wrapped boost::optional in OPT<> class for the purpose of easier transition to C++17 in the future 2017-11-03 23:59:02 +01:00
Tomasz Włostowski 781008bfa5 refactoring: allow to run TOOL_MANAGER and SELECTION_TOOL without a host wxFrame 2017-11-03 20:02:06 +01:00
jean-pierre charras 6300041ce4 Fix a focus issue in GAL canvas:
Sometimes there is no window that has the focus (it happens when an other PCB_BASE_FRAME is opened and is iconized on Windows).
2017-10-30 15:12:41 +01:00
jean-pierre charras 788972554b minor fix 2017-10-23 19:11:32 +02:00
jean-pierre charras eb2340bc23 Show/Hide icons in menus (according to Icons option) in GAL, like in Legacy mode.
Cosmetic enhancement in Gerbview context menu.
2017-10-23 18:48:03 +02:00