Commit Graph

82 Commits

Author SHA1 Message Date
jean-pierre charras d0754acf00 Fix code after renaming files 2018-01-29 11:37:29 +01:00
Jeff Young 899afa1e90 Reinstate OSX cursor shape selection
Mark it as not supported in Legacy graphics.

Fixes: lp:1745097
* https://bugs.launchpad.net/kicad/+bug/1745097
2018-01-28 10:47:20 -05: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
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
Seth Hillbrand cc836903bd Disable live resizing for wxAUI as it glitchy
Fixes: lp:1695897
* https://bugs.launchpad.net/kicad/+bug/1695897
2018-01-13 17:28:28 -05:00
Jon Evans 2dec95b4e6 Add a first-run dialog to encourage user to switch to OpenGL 2018-01-04 10:14:40 -05:00
Julius Schmidt 9df938484a support "disable autopan" with gal canvas
Fixes: lp:1670712
* https://bugs.launchpad.net/kicad/+bug/1670712
2017-11-24 12:20:15 +01: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
Maciej Suminski 05a120f09f Unified {Load,Save]CanvasTypeSetting in EDA_DRAW_FRAME 2017-09-25 13:39:32 +02:00
Wayne Stambaugh 427e5ec461 Eeschema: fix crash when undo called during item edit.
Add EDA_DRAW_FRAME::isBusy() method to test if the current item is being
edited or a block operation is in progress.

Ignore undo and redo commands when editor is busy.

Fixes lp:1718656

https://bugs.launchpad.net/kicad/+bug/1718656
2017-09-21 12:37:52 -04:00
Maciej Suminski e18475f220 Renamed remaining constants to match the action (see ab44e7cc) 2017-07-04 10:08:33 +02:00
Kristoffer Ödmark 4fb2f80dd4 Eeschema copy/cut/paste to ctrl+c/x/v cut is now undoable Highlight net is now at ctrl+b by default 2017-07-03 16:41:47 +02:00
Tomasz Włostowski 3b16d3cffe further DLIST/Iterators cleanup, some code formatting 2017-06-23 11:12:37 +02:00
Tomasz Włostowski 9ad886344b New connectivity algorithm. 2017-06-23 11:12:36 +02:00
jean-pierre charras ad48cd435d Replace SetToolID( ID_NO_TOOL_SELECTED, ...) by SetNoToolSelected() in code 2017-06-12 16:17:48 +02:00
jean-pierre charras 6ed4f9b208 Make EDA_DRAW_FRAME::SetToolID and mouse cursor shape setting working in GAL canvases, and uses same mouse cursor shapes in legacy and gal canvases.
Starting fixing incorrect UI behavior of Zoom to selection in Pcbnew.
2017-06-12 15:16:09 +02:00
jean-pierre charras 04e24282a8 Fix bug: Render->Grid(Color) doesn't saved between kicad sessions.
Fixes: lp:1670084
https://bugs.launchpad.net/kicad/+bug/1670084
2017-04-01 11:48:02 +02:00
John Beard 27374c0aa3 Move file locking utilities to a separate file
The global ::LockFile() function is used in a single place, but it's in
common.h, so visible to all files.

The GetKicadLockFilePath function is used in only two places, and one of
them is LockFile.

This commit puts them both in a separate header, so they're only visible
to code using them.

The implementation of GetKicadLockFilePath is moved to lockfile.cpp,
where LockFile already was.

Also removed a (large) handful of wxT macros, which aren't needed any
more and make code less readable.
2017-03-23 09:23:45 -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
Jon Evans a52250a91e Change from EDA_COLOR_T to COLOR4D globally; arbitrary color support
eeschema now supports arbitrary colors for all object types, and
pcbnew does in GAL canvas.  When switching from GAL to legacy canvas,
pcbnew will convert colors to the nearest legacy color.
2017-02-22 17:35:00 +01:00
Jon Evans 167f45ca2b Refactor COMMON_ACTIONS into a base and derived class
New virtual class ACTIONS is added as a member to EDA_DRAW_FRAME so
that the TOOL_DISPATCHER can have access to the appropriate derived
version of TranslateLegacyId()
2017-02-22 10:32:48 +01:00
John Beard cdfcc9a2ab Put draw_frame.h GAL_DISPLAY_OPTIONS behind firewall
The GAL_DISPLAY_OPTIONS member of EDA_DRAW_FRAME is a private member and
is used in only a couple of places in the class. The real use of this
member is by a by-ref interface, GetGalDisplayOptions.

Because te GAL options are used by a very select few users of
EDA_DRAW_FRAME, it makes little sense to force all the (many) files
including draw_frame.h to also include gal_display_options.h, when the
vast majority have no need for it.

This massively speeds up compilation of the project when
gal_display_options.h is changed.

More isolation could be acheived by separating the GAL config types (eg
OpenGL antialias modes and grid style) from the options header, as,
although the GAL class uses them, not many includers of the GAL header
need the options struct as well.
2017-02-20 10:52:33 +01:00
decimad 77138e3702 Add UI control to set up gal opengl antialiasing and load/store the settings 2017-01-11 16:20:37 +01:00
Chris Pavlina 9eef653625 Remove legacy option to zoom to selection on middle mouse button
This feature was not reliably available: neither pl_editor nor GAL supported
it. It has been replaced over the past few commits with a new zoom-to-selection
tool available in all applications and modes.
2016-06-11 19:37:43 -04:00
jean-pierre charras cdf2b6950e Legacy mode: Pan with mouse middle button fix an unwanted displacement of the drawings (half width of scroll bars) when starting the pan (due to a parameter (new reference position of scroll bars in IU) which was stored with an incorrect value)
Minor enhancement during pan: the mouse cursor shape is modified.
2016-06-09 10:43:32 +02:00
Chris Pavlina 8c01318141 Add zoom-to-selection tool 2016-06-08 07:19:53 -04:00
Chris Pavlina ce3ccec528 Fix incorrect scaling in scrollbar fix (r6895, 35883bb)
...how did this ever look like it worked?
2016-06-08 06:26:39 -04:00
Chris Pavlina 35883bb74b Account for scrollbars when centering 2016-06-07 20:28:11 -04:00
Chris Pavlina 0f407a756c Pull existing settings into Doxygen module 2016-05-12 15:45:47 -04:00
Chris Pavlina 84d3fbfd68 Remove MaxUndoItems, make devel option DevelMaxUndoItems
Begin documenting configuration keys in Doxygen
2016-05-12 12:51:32 -04:00
Chris Pavlina 540275fe44 OS X: Disable full-screen cursor
This feature cannot work reliably for reasons explained in lp:1463505. Remove
the option on OS X builds and force cursor to the small one.

https://bugs.launchpad.net/kicad/+bug/1463505

> Bernhard Stegmaier (stegmaier) wrote on 2016-01-14:
>
> As far as I see from the code this is no bug but done on intention.
>
> The reason probably is that on OSX in the legacy canvas you don't have the
> XOR-drawing as on other platforms. To the best of my knowledge, this would
> mean that on every mouse move you would have to repaint the whole window just
> to get rid of the "old" cross.
>
> So, I would say this is a clear "won't fix".
> We could think of just removing/disabling the button in the legacy canvas.
2016-05-10 23:33:24 -04:00
jean-pierre charras c146cc09eb Kicad: fix a crash when changing a project, if pcbnew was run and "Update PCB from Schematic" was run and Schematic editor never opened.
(In this case the schematic frame exists, but some members are not initialized as expected, and a crash happens when calling the schematic editor dtor)
Minor other fix: avoid multiple very similar strings to translate in 3d_filename_resolver.cpp
2016-04-08 14:11:05 +02:00
Bernhard Stegmaier f8abe9c191 Add support for optional touchpad panning. 2016-02-24 14:53:02 -05:00
Chris Pavlina c490e7dd06 Fix typing problems with GR_KB_* constants 2016-01-20 07:11:17 -05:00
jean-pierre charras f7f7e3e918 Remove useless or not working code used in Load/Save config. 2015-08-31 08:43:33 +02:00
Jon Neal 0aa9fad668 Push UI preferences to child edit and view windows. (fixes lp:1468388)
* Push center on zoom, use middle mouse button to pan, limit panning, and
  pan while moving object settings from schematic editor to symbol library
  editor and symbol library viewer child windows.
* Push center on zoom, use middle mouse button to pan, limit panning, and
  pan while moving object settings from board editor to footprint library
  editor and footprint library viewer child windows.
2015-08-25 10:16:15 -04:00
Maciej Suminski 0386a4df94 Bulletproof canvas switching. 2015-08-21 10:33:36 +02:00
Chris Pavlina fa29c62277 Fix saving undo/redo limits in Eeschema. 2015-08-05 20:10:52 -04:00
Chris Pavlina aaadb40a71 Make undo/redo limits user configurable.
* Add code to allow each editing window it's own undo/redo count.
* Add code to allow for infinite undo/redo when count is set to 0.
* Add edit control to all editing windows general options dialog for
  user configuration of undo/redo count.
* Add code to save and restore undo/redo count for each editing window.
2015-08-05 10:28:27 -04:00
Maciej Suminski c9837595ef Fixed VIEW_CONTROLS too frequent reset. 2015-07-28 10:30:06 +02:00
Maciej Suminski 36d3d9f78e Cursor warps to the drag origin (GAL). 2015-07-15 17:32:30 +02:00
Jon Neal fdf5b821f0 Add centering cursor on zoom to GAL. 2015-07-09 10:18:27 +02:00
Maciej Suminski 3cb095b7c2 GAL canvases update status bar, message panel & zoom widget. 2015-07-03 20:58:12 +02:00
Maciej Suminski 705c4ef4c5 bugfix: Blank footprint viewer in legacy canvas. 2015-07-02 21:25:39 +02:00
jean-pierre charras 1311f81448 Replace wxComboBoxes by wxChoice in auxiliary horizontal toolbar, to try to avoid issues on OSX. 2015-07-02 11:50:38 +02:00
Maciej Suminski 37db33cbca Update cross hairshape (GAL). 2015-06-26 17:30:41 +02:00
Maciej Suminski b3d4a680fa Prevent weird viewport settings after switching twice to GAL canvas. 2015-06-18 17:51:52 +02:00
jean-pierre charras 84ba36fa72 Allows switching GAL or legacy mode in footprint editor (previously, the mode was inherited from the board editor, and was not modifiable without closing the footprint editor) by menu or F9, F11 and F12 keys) 2015-05-19 18:39:05 +02:00
jean-pierre charras 37b0868376 Pcbnew: fix minor issues about fast grid switching, and next/previous grid selection from hotkeys. (GAL mode still has an issue) 2015-05-12 11:05:36 +02:00
Maciej Suminski da75c52665 Hot keys settings are synchronized between GAL & legacy 2015-05-05 20:39:42 +02:00