Commit Graph

3244 Commits

Author SHA1 Message Date
Maciej Suminski d85256bfa9 Moved background color settings from GAL to RENDER_SETTINGS. Added RENDER_SETTINGS::TranslateColor() to convert between EDA_COLOR_T and COLOR4D. 2014-05-14 10:35:12 +02:00
Maciej Suminski ccb956b7d3 Holding shift always activates extend current selection mode (in GAL canvas). 2014-05-14 09:56:35 +02:00
Maciej Suminski 1aa6d7f0f0 Via holes were always visible in GAL canvas - fixed. 2014-05-14 09:48:29 +02:00
Maciej Suminski 3bcb728c84 Fixed modification point for EDIT_TOOL when the tool is not active. 2014-05-13 11:22:51 +02:00
Maciej Suminski 9d61f82f68 Moved NETCLASSES to BOARD_DESIGN_SETTINGS.
Most of the changes are just adding GetDesignSettings() before every occurence of m_NetClasses.
More complex changes:
class_netclass.cpp - NETCLASS does not store the pointer to the parent BOARD anymore. Added function SetParams( BOARD_DESIGN_SETTINGS& ).
class_netclass.h - Removed GetTrackMinWidth(), GetViaMinDiameter(), GetViaMinDrill(), GetuViaMinDiameter(), GetuViaMinDrill() as they were refering to BOARD_DESIGN_SETTINGS anyway (they are not net class specific).
kicad_plugin.cpp - filters out empty nets (that are anyway not saved) when storing net class information. Previously it was done in NETCLASS::Format() function.
2014-05-13 11:22:51 +02:00
Maciej Suminski 3b735771d8 Fixed namecase for private fields in BOARD_DESIGN_SETTINGS class.
Moved a few one-liners of BOARD_DESIGN_SETTINGS class to the header file.
2014-05-13 11:22:51 +02:00
Maciej Suminski d8af04a5e3 Moved most of the board design rules related fields & methods to BOARD_DESIGN_SETTINGS class. 2014-05-13 11:22:51 +02:00
Maciej Suminski 39587ee1b7 Custom width settings taken into account in wxUpdateUIEvent handlers. 2014-05-13 11:22:51 +02:00
Maciej Suminski a48377bcee Custom track/via size settings nicely cooperate with other options. 2014-05-13 11:22:51 +02:00
Maciej Suminski 82303217af Initial support for custom track width & via size. 2014-05-13 11:22:51 +02:00
Maciej Suminski ff0ca7ee95 Fixed rotation/flip point. 2014-05-13 11:22:51 +02:00
Maciej Suminski cdcb10d8bc Pad properties are back. 2014-05-13 11:22:51 +02:00
Maciej Suminski 2c594c9b18 SELECTION_TOOL updates dragging offset after rotating/flipping.
Cursor position is saved as a field in order to avoid drifting of items while they are being dragged and rotated/flipped.
2014-05-13 11:22:51 +02:00
Maciej Suminski d08f8ed62d More compatibility fixes. 2014-05-13 11:22:51 +02:00
Maciej Suminski ef7e71e93a Fixed jumpy zoom when hotkeys and scroll wheel were used alternatively. 2014-05-13 11:22:51 +02:00
Maciej Suminski f092fac22e Resolved HOME hot key conflict between menu entry (Zoom Page) and event assigned to the hot key in the ACTION_MANAGER.
Conflicts:
	pcbnew/menubar_pcbframe.cpp
2014-05-13 11:22:51 +02:00
Maciej Suminski eefeb7c0cf Added preference for selecting tracks/vias/graphics if there is a module present in the selection point. 2014-05-13 11:22:51 +02:00
Maciej Suminski 76c61e92f7 Ratsnest lines are highlighted together with all items in the same net. 2014-05-13 11:22:51 +02:00
Maciej Suminski 641e6398fd Ratsnest was not refreshed on board reload - fixed. 2014-05-13 11:22:50 +02:00
Maciej Suminski fcfc4210e8 Upstream merge. 2014-05-12 17:17:51 +02:00
Lorenzo Marcantonio b5ae5f3f4d More refactoring of the track cleanup code
Algorithm is still the same... now need to know what it really meant to do
2014-05-10 14:48:17 +02:00
Dick Hollenbeck 9cea792545 Modular-Kicad milestone B), minor portion:
*)  Implement a framework for "Data Load On Demand".

*)  Implement FP_LIB_TABLE* PROJECT::PcbFootprintLibs(), which is the first
    prototype.

This allows the project specific footprint tables to be part of the Module Editor
when invoked from Eeschema.
2014-05-09 13:35:48 -05:00
Dick Hollenbeck 6961f9bca0 Try some new Mac support ideas. 2014-05-09 09:27:21 -05:00
Lorenzo Marcantonio 005708f30d Missing const caused unpickability of tracks 2014-05-06 17:14:47 +02:00
Dick Hollenbeck bb9c11492c Fix new bug which crashed pcbnew running under kicad.exe while adding a new module in mod editor 2014-05-05 23:58:33 -05:00
Dick Hollenbeck 3d9d0247e7 Modular-Kicad milestone B), glamorous portions:
*) Eeschema can now show the footprint editor.

*) Eeschema can now invoke the footprint picker from the library part field editor.

*) KIWAY_PLAYER::ShowModal() takes aResultantFocusWindow that tells what window
   to give the focus to.  Required since frames are often near the top of the
   hierarchy and they are invoked by a peer, not a parent.
2014-05-05 12:28:40 -05:00
Maciej Suminski 6a58dc67e9 Upstream merge. 2014-05-05 10:51:31 +02:00
jean-pierre charras 65d02e479a footprint editor: fix crashes. In this fix, I removed the assumption the parent frame is the board editor.
However, this assumption is still present here and there  in the moduleframe code.
2014-05-05 09:46:07 +02:00
Dick Hollenbeck e3ebd725cd Quasimodo is not a monster, he is your friend. 2014-05-04 19:19:16 -05:00
Dick Hollenbeck ea06a99874 Modular-Kicad milestone B), minor portions:
*) KIWAY_PLAYER::IsModal() is now a retained state, controlled by SetModal()

*) Fully re-work the KIWAY_PLAYER::ShowModal() to use a nested event loop.

*) Add support to DIALOG_SHIM for a "quasi-modal" dialog presentation and mode.
   See top of dialog_shim.cpp about that for benefits and need.

*) You can now pick footprint from the schematic component field dialog, although
   if you do this before you open the BOARD, you will only get the global footprint
   libraries, not also the project specific ones.  Opening the BOARD first avoids this
   problem.

This is the first example of cross KIFACE invocation, it is also the first
instance of using a TOP_FRAME other than FRAME_PCB as the first thing. It works,
but it's missing support for opening the project specific table because
historically the FRAME_PCB did that. This is now starting to expose all the near
term needs for KIWAY_PLAYER <-> PROJECT interaction, independence and out of
sequence usage.

A fix for this will be coming in a few days.

However it mostly starts to show why the KIWAY is terribly useful and important.
2014-05-04 13:22:27 -05:00
Maciej Suminski f292a1db89 Clearing m_hiddentItems to avoid PNS crashes. 2014-05-04 20:20:49 +02:00
Lorenzo Marcantonio 467d8b41f8 Constification of HitTest and GetParent
In particular HitTest for zones *do not* select the nearest vertex/edge as a side effect
2014-05-04 19:08:36 +02:00
Dick Hollenbeck 9f834561c3 Change order of headers for wx 2.8, use wxWindowDisabler not ENABLE_DISABLE. 2014-05-03 19:44:57 -05:00
Dick Hollenbeck 1ab4fca573 Modular-Kicad milestone B), major portions:
*) Rework the set language support, simplify it by using KIWAY.  Now any major
   frame with a "change language" menu can change the language for all KIWAY_PLAYERs
   in the whole KIWAY.  Multiple KIWAYs are not supported yet.

*) Simplify "modal wxFrame" support, and add that support exclusively to
   KIWAY_PLAYER where it is inherited by all derivatives.  The function
   KIWAY_PLAYER::ShowModal() is in the vtable and so is cross module capable.

*) Remove the requirements and assumptions that the wxFrame hierarchy always
   had PCB_EDIT_FRAME and SCH_EDIT_FRAME as immediate parents of their viewers
   and editors. This is no longer the case, nor required.

*) Use KIWAY::Player() everywhere to make KIWAY_PLAYERs, this registers the
   KIWAY_PLAYER within the KIWAY and makes it very easy to find an open frame
   quickly.  It also gives control to the KIWAY as to frame hierarchical
   relationships.

*) Change single_top to use the KIWAY for loading a KIFACE and instantiating
   the single KIWAY_PLAYER, see bullet immediately above.

*) Add KIWAY::OnKiwayEnd() and call it from PGM_BASE at program termination, this
   gives the KIFACEs a chance to save their final configuration dope to disk.

*) Add dedicated FRAME_T's for the modal frames, so m_Ident can be tested and
   these modal frames are distinctly different than their non-modal equivalents.
   KIWAY_PLAYER::IsModal() is !not! a valid test during the wxFrame's constructor,
   so this is another important reason for having a dedicated FRAME_T for each
   modal wxFrame.

On balance, more lines were deleted than were added to achieve all this.
2014-05-03 12:40:19 -05:00
unknown dfad6b79e6 Fix issue in bga footprint wizard. 2014-05-02 08:28:40 +02:00
Maciej Suminski 4f83504d7b Upstream merge. 2014-05-01 15:55:50 +02:00
Lorenzo Marcantonio 149e3cb2a3 Virtual split of TRACK/VIA::HitTest 2014-05-01 08:50:11 +02:00
Lorenzo Marcantonio 5e266fc0bf - Better way to iterate on vias in the track list (GetFirstVia)
- Converted the Next/Prev C casts to static casts and removed the type
  unsafe ones
- Splitted as virtual the VIA::Flip member instead of using RTTI
- Heavily refactored the 'unconnected track' cleanup routine
- Misc constification
2014-04-30 21:16:22 +02:00
Lorenzo Marcantonio 852f21a7dc Fixed bug in via cleanup control flow 2014-04-26 13:23:00 +02:00
Lorenzo Marcantonio f1069929df Reworked the endpoint designator constants FLG_BEGIN and FLG_END in a
ENDPOINT_T enum type
2014-04-25 19:13:33 +02:00
Lorenzo Marcantonio 249003e594 Removed the ugly bit stuffing for the bottom via layer number
(just replaced it with a member)
2014-04-25 10:03:50 +02:00
Dick Hollenbeck 28497f10dd SEGVIA -> VIA for swig 2014-04-25 01:43:14 -05:00
Lorenzo Marcantonio 37adb11be5 TRACK/SEGVIA cleanup
- SEGVIA becomes VIA
- Drill size moved from TRACK to VIA
- Removed shape from TRACK, becomes ViaType in VIA
- GetTrace becomes GetTrack, for uniformity
- Some minor constification and typo fixes
2014-04-25 08:00:04 +02:00
jean-pierre charras 63d4051059 Pcbnew: fix Bug #1304418 . Fix also a related issue which crashes Pcbnew in some corner cases.
(for instance, when a footprint from the currently edited board is loaded in the footprint editor, and when the board is cleared or reloaded)
In footprint editor, the net names are no more shown od modifiable (becuase the footprint editor does not know anything about net names.
This change should allow the changes planned in pcbnew.
2014-04-24 20:54:49 +02:00
Andrey Fedorushkov 88ec4fe02f fix not correct build if BUILD_GITHUB_PLUGIN=ON in linux rpm-based distro 2014-04-24 09:44:27 +04:00
John Beard c5a14f28f1 Add John Beard's patch: new and useful footprint wizards (SIP/SIP, SOIC/SSOP/TSSOP/MSOP and BGA).
Add Python utility tools to make wizard scripts more easy to write.
2014-04-23 18:36:31 +02:00
Dick Hollenbeck 115124c528 Functional
*) void KIWAY::ExpressMail( FRAME_T aDestination, MAIL_T aCommand, const std::string& aPayload, wxWindow* aSource=NULL );
*) virtual void KiwayMailIn( KIWAY_EXPRESS& aEvent );
*) enum MAIL_T expansion into the brave new world if cross KIWAY_PLAYER communications.

Let the KIWAY_PLAYING begin.....
through well conceived mail from one KIWAY_PLAYER to another.
Get thinking now.  Add a new MAIL_T value, then send ExpressMail(), 
and receive it in KiwayMailIn(), it's that easy.
2014-04-21 09:49:33 -05:00
Dick Hollenbeck 470b7eddb3 Get cross-probing working under the Kiway. 2014-04-21 01:51:33 -05:00
Dick Hollenbeck 0c65353c17 happy Easter 2014-04-21 01:28:17 -05:00
Dick Hollenbeck c32443fe35 add back missing pcbnew cross probing event handlers. eeschema launches kiface versions of pcbnew & cvpcb if not single. 2014-04-19 23:35:34 -05:00