Commit Graph

258 Commits

Author SHA1 Message Date
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
jean-pierre charras 4905bbe500 hotkey management: enhancements in code to know if a hotkey was handled by an event or not.
No actual change in key management: in legacy it was partially existing, and not yet used in GAL mode.
2017-10-06 09:23:13 +02:00
Jon Evans 77bf22359e Move zoom_tool.h to include 2017-09-25 13:35:01 +02:00
jean-pierre charras b18601dfc6 Send wxEVENT_CHAR to GUI (if the key is not a special key that scrolls the draw panel) both on Linux and Windows
fix lp:1718488
2017-09-20 20:21:54 +02:00
jean-pierre charras 48393c605e Try to fix special keys (ARROWS, PAGE UP/DOWN) issues both on Linux and Windows in GAL mode
Fixes: lp:1717270
https://bugs.launchpad.net/kicad/+bug/1717270
2017-09-18 16:04:31 +02:00
jean-pierre charras e2505cb2fd better fix than commit c0bc2f1 that tried to fix an overzealous event propagation:
The fix is now only for Windows, because it creates issues and does not fix the special keys issues on Linux.
This is due to the serious differences in event management between platforms.
2017-09-15 16:29:26 +02:00
jean-pierre charras c0bc2f1bee Try to fix an overzealous event propagation that creates some key events (arrows, page up page down and some others) and mouse events called twice.
the first call is the right call, the last call being the default handler.
2017-09-15 11:29:50 +02:00
Jon Evans eec1366ead Move ZOOM_TOOL to common; add RMB-drag to zoom out 2017-08-31 10:04:00 +02:00
Tomasz Włostowski 2e4c22f718 router: fix corruption of board data when the inline drag is activated while the router tool is running
Fixes: lp:1712838
* https://bugs.launchpad.net/kicad/+bug/1712838
2017-08-30 01:16:06 +02:00
Maciej Suminski ef22c2589d Store forced cursor position in VC_SETTINGS 2017-08-07 08:59:32 +02:00
Maciej Suminski 76bd05a69b Prevent creating too many transitions by TOOL_MANAGER
- added TOOL_INTERACTIVE::resetTransitions()
- made protected and moved TOOL_BASE::setTransitions() to TOOL_INTERACTIVE
- TOOL_MANAGER calls TOOL_INTERACTIVE::resetTransitions() instead of
setTransitions()
2017-07-31 15:09:19 +02:00
Maciej Suminski 2652cfeafd Restore the cursor position after the context menu is closed
Fixes: lp:1696328
* https://bugs.launchpad.net/kicad/+bug/1696328
2017-07-28 10:55:38 +02:00
Maciej Suminski 950d87a920 Removed boost::adaptor from ACTION_MANAGER 2017-07-27 16:06:30 +02:00
Maciej Suminski 75f68061a4 Save the drag origin only on the first click 2017-07-27 10:54:08 +02:00