Commit Graph

3617 Commits

Author SHA1 Message Date
Maciej Suminski 0d9373ca6c Undo/report support for track dragging (PNS). 2014-05-14 18:45:59 +02:00
Maciej Suminski d7ac368260 PNS routing settings are stored between router invocations. 2014-05-14 16:53:49 +02:00
Maciej Suminski f31dd1cdaf PNS debug output is enabled with PNS_DEBUG define. 2014-05-14 16:40:56 +02:00
Maciej Suminski def53707d5 TOOL_MANAGER is no longer static. Reworked autoregistration of TOOL_ACTIONs. 2014-05-14 16:29:53 +02:00
Maciej Suminski ae4f41c328 Added missing dialog files for pcbnew. 2014-05-14 16:28:39 +02:00
Tomasz Włostowski 061660e9e4 Long-awaited new version of the P&S router 2014-05-14 15:53:54 +02:00
Tomasz Włostowski e9afb10a9d Switching top layer should update the layer widget 2014-05-14 13:54:59 +02:00
Maciej Suminski 922bf1ddea Fixed freezing of GAL canvas if user chooses Cancel in the on close dialog. 2014-05-14 12:08:29 +02:00
Maciej Suminski d27ea7895d 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 2cba91f974 Holding shift always activates extend current selection mode (in GAL canvas). 2014-05-14 09:56:35 +02:00
Maciej Suminski 27bb059aaf Via holes were always visible in GAL canvas - fixed. 2014-05-14 09:48:29 +02:00
Maciej Suminski 562beafcde Fixed modification point for EDIT_TOOL when the tool is not active. 2014-05-13 11:22:51 +02:00
Maciej Suminski d9eb15c9fa 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 5af454c28b 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 cd8aaee160 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 7ec1313cbc Custom width settings taken into account in wxUpdateUIEvent handlers. 2014-05-13 11:22:51 +02:00
Maciej Suminski 917e47397d Custom track/via size settings nicely cooperate with other options. 2014-05-13 11:22:51 +02:00
Maciej Suminski ffe212ea5e Initial support for custom track width & via size. 2014-05-13 11:22:51 +02:00
Maciej Suminski 9325a9e74d Fixed rotation/flip point. 2014-05-13 11:22:51 +02:00
Maciej Suminski a0801e2d8e Pad properties are back. 2014-05-13 11:22:51 +02:00
Maciej Suminski 929008c6c3 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 761375ddef More compatibility fixes. 2014-05-13 11:22:51 +02:00
Maciej Suminski 2f5103bc67 Fixed jumpy zoom when hotkeys and scroll wheel were used alternatively. 2014-05-13 11:22:51 +02:00
Maciej Suminski 50193f1751 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 6b222d19d5 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 7fd9fc4911 Ratsnest lines are highlighted together with all items in the same net. 2014-05-13 11:22:51 +02:00
Maciej Suminski 1cbf03cb60 Ratsnest was not refreshed on board reload - fixed. 2014-05-13 11:22:50 +02:00
Maciej Suminski d6fd8b2e23 Upstream merge. 2014-05-12 17:17:51 +02:00
Maciej Suminski 2ed804b8ef Upstream merge. 2014-05-12 17:17:51 +02:00
Lorenzo Marcantonio f9ba502b72 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
Lorenzo Marcantonio 7dc8fc1f29 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 e45aadd11b 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 9fe5ce67e6 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 ecbe6e0856 Try some new Mac support ideas. 2014-05-09 09:27:21 -05:00
Dick Hollenbeck c855824337 Try some new Mac support ideas. 2014-05-09 09:27:21 -05:00
Lorenzo Marcantonio e797c489d1 Missing const caused unpickability of tracks 2014-05-06 17:14:47 +02:00
Lorenzo Marcantonio e4508a65ff Missing const caused unpickability of tracks 2014-05-06 17:14:47 +02:00
Dick Hollenbeck 0e8a72dbf0 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 8434498394 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 55e61bc6e3 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
Dick Hollenbeck 3b0712873a 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 a4cdf25f83 Upstream merge. 2014-05-05 10:51:31 +02:00
Maciej Suminski 9536ed811d Upstream merge. 2014-05-05 10:51:31 +02:00
jean-pierre charras fc26cdfb74 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
jean-pierre charras d9c3de9bbd 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 74cb23a958 Quasimodo is not a monster, he is your friend. 2014-05-04 19:19:16 -05:00
Dick Hollenbeck fb346a0c10 Quasimodo is not a monster, he is your friend. 2014-05-04 19:19:16 -05:00
Dick Hollenbeck fef168aaed 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
Dick Hollenbeck a2227a75b4 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 fa5a6e5dd2 Clearing m_hiddentItems to avoid PNS crashes. 2014-05-04 20:20:49 +02:00
Lorenzo Marcantonio 85c5aa22c6 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
Lorenzo Marcantonio 342016b692 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 f16f248bf9 Change order of headers for wx 2.8, use wxWindowDisabler not ENABLE_DISABLE. 2014-05-03 19:44:57 -05:00
Dick Hollenbeck 19c184df97 Change order of headers for wx 2.8, use wxWindowDisabler not ENABLE_DISABLE. 2014-05-03 19:44:57 -05:00
Dick Hollenbeck 25d1ab4008 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
Dick Hollenbeck 991926d320 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 0ff0b9b835 Fix issue in bga footprint wizard. 2014-05-02 08:28:40 +02:00
john.j. 32c676540d Fix issue in bga footprint wizard. 2014-05-02 08:28:40 +02:00
Maciej Suminski c3b448b633 Upstream merge. 2014-05-01 15:55:50 +02:00
Lorenzo Marcantonio fca1ba6755 Virtual split of TRACK/VIA::HitTest 2014-05-01 08:50:11 +02:00
Lorenzo Marcantonio 7b4b3297db - 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 29c8ec4220 Fixed bug in via cleanup control flow 2014-04-26 13:23:00 +02:00
Lorenzo Marcantonio c2af94ac03 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 948f22de6d 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 c0879414a5 SEGVIA -> VIA for swig 2014-04-25 01:43:14 -05:00
Lorenzo Marcantonio 3f2c0e1a8d 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 9c1f6b7307 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 32a9a4a400 fix not correct build if BUILD_GITHUB_PLUGIN=ON in linux rpm-based distro 2014-04-24 09:44:27 +04:00
John Beard 38f36ae45c 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 7a129e167b 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 1648d7fd43 Get cross-probing working under the Kiway. 2014-04-21 01:51:33 -05:00
Dick Hollenbeck e47a2bc5d4 happy Easter 2014-04-21 01:28:17 -05:00
Dick Hollenbeck a985255f95 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
Dick Hollenbeck 0d6560a218 *) Switch kicad.exe to using KIFACE modules for all major top level windows.
Eeschema, Pcbnew, and Cvpcb all run under the same process now,
    FOR THE VERY FIRST TIME!

*)  Added KIWAY::PlayerCreate(), PlayerClose(), and PlayersClose().

*)  Factored FRAME_T into <frame_type.h> from ID_DRAWFRAME_TYPE.

*)  Found that the following command line is helpful for collecting all the *.kiface
    files into the <build>/kicad/ directory so that kicad can find them.

      $ cp `find . -name '*.kiface'` kicad/

    Maybe somebody will want to rework how the CMake files are organized so all
    the binaries can go into the same place.  See python-a-mingw-us.

*)  This might fix the problem on the Mac where child process windows were not
    coming to the front.  See ->Raise() in kicad/mainframe.cpp.

*)  You can set USE_KIFACE to 0 in kicad/mainframe.cpp to chain load child exes
    instead of using the KIFACE modules directly, i.e. revert.
2014-04-19 13:47:20 -05:00
Nick Østergaard ee3e97e6ca Fix vertical offset for multiline text in VRML exporter. 2014-04-19 18:05:58 +02:00
Dick Hollenbeck 5f65d0da93 *) Add KIFACE_I::StartFlags() and IsSingle() so a KIFACE implementation can know
if it is running under single_top.cpp or under a project manager.

*)  Test Kiface().IsSingle() when adding menus, some operations are not permitted
    when running under a project manager and the KIWAY_PLAYER is pegged to a
    specific project.

*)  Implemented KIWAY::KiFACE() so it loads *.kiface files.  They still have to be
    in the same directory as the main *.exe launcher, so this presents some difficulty
    when the binaries are not yet installed but rather the *.kiface files are still
    in their original build directories.  For today, I simply copied _pcbnew.kiface
    to build/kicad/.

*)  Add a test case to kicad/mainframe.cpp just to get an early peek at loading
    _pcbnew.kiface under the C++ project manager.  Got that working for one
    specific invocation just for proof of concept.  Surprise, it works.
2014-04-17 21:05:40 -05:00
Maciej Suminski e7ea0480e4 Upstream merge. 2014-04-16 11:26:41 +02:00
Lorenzo Marcantonio d2e56665f5 - Began rework/cleanup of the board cleanup routine
- Set the modified flag even for null segment removal
2014-04-13 20:24:44 +02:00
Dick Hollenbeck 95ea4f6cc5 remove a static wxString constructor which was out of sequence with another dependent one, at least with one toolchain. 2014-04-13 07:48:58 -05:00
Maciej Suminski 5efdac01c1 Fix MinGW OpenMP link error. 2014-04-09 20:55:34 -04:00
Maciej Suminski 3f8d9da31f Key events are handled by wxEVT_CHAR instead of wxEVT_KEY_[UP|DOWN]. Fixed issue of chars that require modifiers (e.g. ? is Shift+/ on US keyboard layout). 2014-04-09 17:33:22 +02:00
Maciej Suminski 50b202fe99 Hot keys specific to a tool have priority over global hot keys (TOOL_ACTION scope: AS_GLOBAL/AS_CONTEXT is finally handled properly). 2014-04-09 17:05:05 +02:00
Maciej Suminski 371b2f7c0e Fixed vias layer order. 2014-04-09 17:01:22 +02:00
Maciej Suminski e6fd3934d1 Fixed ratsnest update after removing items. 2014-04-09 16:57:22 +02:00
Dick Hollenbeck 4011953455 Jettison FP_LIB_TABLE::ConvertFromLegacy() into a static function, where it
was used locally.  Then comment it out in favor of a newer strategy for
filling in nicknames in cvpcb. 

Add MODULE* FootprintLoadWithOptionalNickname( const FPID& aFootprintId )
        throw( IO_ERROR, PARSE_ERROR );
from code found elsewhere.
2014-04-09 08:33:04 -05:00
Dick Hollenbeck d053e5615b More migration towards single process, extend PROJECT::Config*() in proper direction, cleanups. 2014-04-07 23:55:53 -05:00
Maciej Suminski 85365b0dbc Upstream merge. 2014-04-07 18:00:13 +02:00
Maciej Suminski 82661dc3a6 GAL defaults to Cairo, so KiCad does not fail on completely OpenGL incapable systems.
Board is cached in GAL only when the canvas is activated.
2014-04-07 16:04:54 +02:00
Maciej Suminski c5b65e1ec4 Fixed outline breaking for zones (points were not always created in the double click point). 2014-04-07 14:30:38 +02:00
Maciej Suminski cc445391e9 Items that may be modified using EDIT_POINTs used to stay selected after pressing ESC (only EDIT_POINTs got away) - fixed. 2014-04-07 13:59:27 +02:00
Maciej Suminski 7dc08c8718 Fixed switching back to selection tool using the right toolbar buttons in pcbnew (GAL). 2014-04-07 13:50:18 +02:00
Maciej Suminski 6fa2f060fa Formatted ttl library to comply with KiCad coding policy. 2014-04-07 13:32:09 +02:00
Dick Hollenbeck c0ed226682 remove a warning message 2014-04-04 13:43:12 -05:00
jean-pierre charras 5768efe881 Pcbnew: commit forgotten change. 2014-04-04 20:35:07 +02:00
jean-pierre charras fe37c549f7 Footprint Editor: minor cosmetic enhancement (which could avoid a report like bug #1302255) 2014-04-04 20:28:35 +02:00
Maciej Suminski a0fb4ed0c1 Bruteforce module update after a netlist reload. 2014-04-04 17:42:35 +02:00
Maciej Suminski a6917280fe Added net highlighting. 2014-04-04 17:40:00 +02:00
Maciej Suminski 9a84944fba Corrected zone display settings for GAL. 2014-04-04 16:58:44 +02:00
Dick Hollenbeck 6beacd6e95 Rework FOOTPRINT_VIEWER_FRAME::GetActiveFootprintViewer(), fix up comments and warnings. 2014-04-04 09:57:26 -05:00
Maciej Suminski 4741d5607c Elements visibility are updated in the GAL. 2014-04-04 16:48:45 +02:00
Maciej Suminski 89da70fe94 Edit->Global Deletions & Edit->Cleanup Tracks and Vias work in GAL, without toggling between canvases. 2014-04-04 15:43:30 +02:00
Maciej Suminski 8b8e8d8f7f Fixed crashes related to ratsnest on canvas change. 2014-04-04 13:03:41 +02:00
Maciej Suminski 14687a45a7 Fixed occasional crashes on undo/redo while dragging. 2014-04-04 12:56:50 +02:00
Maciej Suminski ba275918e3 Renamed [class_]drawpanel_gal.[cpp|h] to [class_]draw_panel_gal.[cpp|h] to follow current naming scheme. 2014-04-04 11:56:04 +02:00
Maciej Suminski 4c5afc46af Added possibility of switching tools by the right toolbar buttons, without deactivating the current tool first (previously tools did not switch if there was one active). 2014-04-04 11:50:15 +02:00
Maciej Suminski bad6cdaa06 TEXTE_MODULE relative position is updated when absolute position is changed (and viceversa). 2014-04-04 09:01:17 +02:00
jean-pierre charras 229613ef26 Cmakefiles: do not create map file on Windows, because creating map file generates hundred of useless wranings.
In PATCH_COMMAND, use patch instead of bzr patch if patch or patch.exe is found (mandatory to use msys2 because bzr patch does not work when using msys2)
2014-04-03 13:55:02 +02:00
Maciej Suminski a01a7b911c Fix Clang build error when OpenMP is not found. 2014-04-03 06:54:08 -04:00
Maciej Suminski 1ef68d73e5 Fixed missing transitions for EDIT_TOOLs. 2014-04-03 10:24:27 +02:00
jean-pierre charras 9b99ac2a53 All: add 2 hotkeys to simulate a mouse left click (key return) and left dclick (key end) 2014-04-03 09:40:55 +02:00
Maciej Suminski b6aa832f83 Converted std::bind1st to boost::bind. 2014-04-02 16:30:48 +02:00
Maciej Suminski 5de41eabd1 Added EC_SNAPLINE to make possible snapping EDIT_LINES by their ends rather than by its center. 2014-04-02 15:57:21 +02:00
Maciej Suminski 23392ce8c9 Upstream merge. 2014-04-02 15:38:59 +02:00
Maciej Suminski 1828edbabe Refactoring EDIT_POINTS, part 3: constraints split to EDIT_POINTs and EDIT_LINEs. 2014-04-02 09:31:35 +02:00
Maciej Suminski 0379247fd4 Refactoring EDIT_POINTS, part 2: replaced index numbers with constants. 2014-04-01 17:41:24 +02:00
Maciej Suminski 6b90eb3a64 Refactoring EDIT_POINTS, part 1: separated functions that operate on EDIT_POINTS and EDIT_LINES. 2014-04-01 17:18:43 +02:00
Maciej Suminski e79934b03d If tool was previously active and it is called again, it is brought to the top of the active tool stack.
It fixes issue of dragging of items that have EDIT_POINTs, when dragging was activated by hovering over an item and using hot key.
2014-04-01 14:35:09 +02:00
Maciej Suminski 79d353671b Fixed autopanning for POINT_EDITOR. 2014-04-01 14:13:00 +02:00
Maciej Suminski a55d25803e Activation of any drawing/placement tool clears current selection. 2014-04-01 14:06:19 +02:00
Maciej Suminski 1fa49ce7f0 Fixed drifting for items dragged using EDIT_TOOL. 2014-04-01 13:30:31 +02:00
Wayne Stambaugh 4eec9fd013 Fix OpenMP link error on MinGW. 2014-03-31 22:38:19 -04:00
jean-pierre charras 4426d4c539 Pcbnew: bug fix: sometimes (depending on a previous command) pcbnew could create an usual zone instead of a keepout zone when the" create keepout zone" tool is activated 2014-03-31 20:14:01 +02:00
jean-pierre charras 4e18b14f14 Finishing dialog_freeroute_exchange.cpp changes to run freeroute.jar if found in kicad binaries.
Very minor other fix
2014-03-29 21:00:14 +01:00
Lorenzo Marcantonio 6d0c5555ea Indentation was completely broken (editor tabbing issue, maybe?) 2014-03-29 12:22:20 +01:00
cdelbegu 44e1f4fa2d Pcbnew - GAL: fix bug #1296811 (The grid can't be enable/disable via the layer manager) 2014-03-28 14:06:30 +01:00
Jean-Samuel Reynaud 47b5bdcd47 Fix a mismatch between method signature in scripting/python_scripting.cpp and scripting/python_scripting.h 2014-03-28 07:27:58 -05:00
jean-pierre charras 0449258761 Fix (temporary fix) a bug I created in dialog_freeroute_exchange.cpp in bzr rev 4769 2014-03-27 19:28:10 +01:00
jean-pierre charras 34c593916c Pcbnew: Fix bug #1296649 (Text on flipped modules incorrectly placed).
Dialog Freeroute: if freeroute.jar is find in kicad binaries, it is run as a standard java application, not as web applcation
Very minor other fixes
FPC_(SMD_type)_footprintwizard.py wizard finished.
2014-03-27 18:45:05 +01:00
Maciej Suminski 39bca76df7 >Added handled hotkeys:
- resetting relative coordinates
- switching units
- not official: changing transparency for layers (works only for main layers, does not work on vias/pads/etc.)
2014-03-24 18:28:21 +01:00
Maciej Suminski 60e9546b62 PCB_EDIT_FRAME::SetHighContrastLayer() went public.
Refactored code that handled zooming events.
Added PCB_RENDER_SETTINGS::Get/SetSketchMode().
PCBNEW_CONTROL reacts to hot keys changing display modes (sketch via/tracks, high contrast).
2014-03-24 17:20:23 +01:00
Maciej Suminski dc9298730d Added PCBNEW_CONTROLS for handling miscellaneous hot keys (trying to be compatible with the default hot key settings). Currently there are a lot of stubs to be filled out (in pcbnew_controls.cpp).
Handled actions:
- switching layers
- switching grids
- changing track width & via size
2014-03-24 08:45:05 +01:00
Marco Serantoni 1c232f5608 [MacOSX] Support for kiface in bundles, workaround for some cairo issues 2014-03-22 12:35:33 +01:00
jean-pierre charras 262ec8920a Minor fixes for Windows: move resources from dso to .exe, to have the application icon in executable, and therefore shown in shortcuts.
pcb_calculator: minor coding style fix.
2014-03-22 09:28:39 +01:00
Maciej Suminski 3a43f0527f Changed void BASE_SCREEN::GetGrids( GRIDS& aList ) to const GRIDS& BASE_SCREEN::GetGrids().
Refactored:
- EDA_DRAW_FRAME::SetNextGrid() & SetPrevGrid()
- PCB_BASE_FRAME::SetFastGrid1() & SetFastGrid2()
Removed a warning from RN_DATA::updateNet(int).
2014-03-21 18:00:11 +01:00
Maciej Suminski c7116e9d03 FIxed too late deletion of TOOLs. 2014-03-21 17:55:46 +01:00
Maciej Suminski 87c9423f0f PCB_EDIT_FRAME::SetActiveLayer() & GetActiveLayer() made public. 2014-03-21 11:17:47 +01:00
Maciej Suminski 0694f2fa1c TOOL_EVENTs autoregister themselves in ACTION_MANAGER.
ROUTER_TOOL events have temporarily changed their hotkeys assignment.
2014-03-21 10:40:50 +01:00
Dick Hollenbeck a7f1939203 simplify and fix the technique used to get the project fp-lib-table 2014-03-20 20:24:35 -05:00
Maciej Suminski 426844896e Minor fixes (check for net codes size for ratsnest, cursor coordinates are not always shown as if the cursor was snapped). 2014-03-20 11:31:32 +01:00
Maciej Suminski dbc4a8f292 GAL zooms in and out using the default hot keys (F1/F2).
Screen size is saved in VECTOR2I instead of VECTOR2D.
2014-03-20 08:47:31 +01:00
Dick Hollenbeck 95aa19198c * KIWAY Milestone A): Make major modules into DLL/DSOs.
!   The initial testing of this commit should be done using a Debug build so that
    all the wxASSERT()s are enabled.  Also, be sure and keep enabled the
    USE_KIWAY_DLLs option.  The tree won't likely build without it.  Turning it
    off is senseless anyways.  If you want stable code, go back to a prior version,
    the one tagged with "stable".

*   Relocate all functionality out of the wxApp derivative into more finely
    targeted purposes:
    a) DLL/DSO specific
    b) PROJECT specific
    c) EXE or process specific
    d) configuration file specific data
    e) configuration file manipulations functions.

    All of this functionality was blended into an extremely large wxApp derivative
    and that was incompatible with the desire to support multiple concurrently
    loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects.
    An amazing amount of organization come from simply sorting each bit of
    functionality into the proper box.

*   Switch to wxConfigBase from wxConfig everywhere except instantiation.
*   Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD,
    PGM_SINGLE_TOP,
*   Remove "Return" prefix on many function names.
*   Remove obvious comments from CMakeLists.txt files, and from else() and endif()s.
*   Fix building boost for use in a DSO on linux.
*   Remove some of the assumptions in the CMakeLists.txt files that windows had
    to be the host platform when building windows binaries.
*   Reduce the number of wxStrings being constructed at program load time via
    static construction.
*   Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that
    these functions are useful even when the wxConfigBase comes from another
    source, as is the case in the KICAD_MANAGER_FRAME.
*   Move the setting of the KIPRJMOD environment variable into class PROJECT,
    so that it can be moved into a project variable soon, and out of FP_LIB_TABLE.
*   Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all
    its child wxFrames and wxDialogs now have a Kiway() member function which
    returns a KIWAY& that that window tree branch is in support of.  This is like
    wxWindows DNA in that child windows get this member with proper value at time
    of construction.
*   Anticipate some of the needs for milestones B) and C) and make code
    adjustments now in an effort to reduce work in those milestones.
*   No testing has been done for python scripting, since milestone C) has that
    being largely reworked and re-thought-out.
2014-03-20 01:47:30 -05:00
Dick Hollenbeck 6bfff89fe5 merge tip in, resolve. 2014-03-20 01:24:33 -05:00
Dick Hollenbeck 2c67c3ff80 * KIWAY Milestone A): Make major modules into DLL/DSOs.
!   The initial testing of this commit should be done using a Debug build so that
    all the wxASSERT()s are enabled.  Also, be sure and keep enabled the
    USE_KIWAY_DLLs option.  The tree won't likely build without it.  Turning it
    off is senseless anyways.  If you want stable code, go back to a prior version,
    the one tagged with "stable".

*   Relocate all functionality out of the wxApp derivative into more finely
    targeted purposes:
    a) DLL/DSO specific
    b) PROJECT specific
    c) EXE or process specific
    d) configuration file specific data
    e) configuration file manipulations functions.

    All of this functionality was blended into an extremely large wxApp derivative
    and that was incompatible with the desire to support multiple concurrently
    loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects.
    An amazing amount of organization come from simply sorting each bit of
    functionality into the proper box.

*   Switch to wxConfigBase from wxConfig everywhere except instantiation.
*   Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD,
    PGM_SINGLE_TOP,
*   Remove "Return" prefix on many function names.
*   Remove obvious comments from CMakeLists.txt files, and from else() and endif()s.
*   Fix building boost for use in a DSO on linux.
*   Remove some of the assumptions in the CMakeLists.txt files that windows had
    to be the host platform when building windows binaries.
*   Reduce the number of wxStrings being constructed at program load time via
    static construction.
*   Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that
    these functions are useful even when the wxConfigBase comes from another
    source, as is the case in the KICAD_MANAGER_FRAME.
*   Move the setting of the KIPRJMOD environment variable into class PROJECT,
    so that it can be moved into a project variable soon, and out of FP_LIB_TABLE.
*   Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all
    its child wxFrames and wxDialogs now have a Kiway() member function which
    returns a KIWAY& that that window tree branch is in support of.  This is like
    wxWindows DNA in that child windows get this member with proper value at time
    of construction.
*   Anticipate some of the needs for milestones B) and C) and make code
    adjustments now in an effort to reduce work in those milestones.
*   No testing has been done for python scripting, since milestone C) has that
    being largely reworked and re-thought-out.
2014-03-19 19:42:08 -05:00
jean-pierre charras 0f09c15f11 Pad editor dialog: Better tests and error messages about issues in pad settings. Fis also an other hard to translate error messge. 2014-03-19 21:06:09 +01:00
Maciej Suminski 093e311a8d Fixed a few ratsnest glitches in GAL. 2014-03-19 15:33:13 +01:00
Maciej Suminski 2d8dc04693 Fixed undo for MARKER_PCBs. 2014-03-19 13:46:52 +01:00
Maciej Suminski ef1ed9646a DRC markers are drawn in GAL canvases. 2014-03-19 13:42:46 +01:00
Maciej Suminski 696a8a89fe Changed cast from float to double in RN_POLY::HitTest. 2014-03-19 11:16:01 +01:00
Maciej Suminski c11b0bc8a6 Break points for zones are not added in the same place as existing points. 2014-03-18 17:02:10 +01:00
Maciej Suminski e6a7ff3c34 Isolated EDIT_CONSTRAINTs to different .cpp/.h files. 2014-03-18 16:55:06 +01:00
Maciej Suminski 6a1d344541 Instant dragging (without prior selection). 2014-03-18 16:25:46 +01:00
Maciej Suminski 9783aaf3e6 Splitting DRAWSEGMENTs with POINT_EDITOR. 2014-03-18 15:46:38 +01:00
Maciej Suminski 17ec7ace4c Breaking outlines for zones using POINT_EDITOR. 2014-03-18 14:52:22 +01:00
Maciej Suminski dbcc18ab31 Enabled autopanning while drawing zones. 2014-03-18 14:01:09 +01:00
Maciej Suminski 342fd6e19e EC_CONVERGING handles colinear lines properly. 2014-03-18 13:57:10 +01:00
Maciej Suminski 4d6f628a1f Minor fixes to zone drawing tool. 2014-03-18 11:33:49 +01:00
Maciej Suminski 1ff99b47c8 Fixed triple click bug while drawing zones with DRAWING_TOOL. 2014-03-18 11:09:43 +01:00
Maciej Suminski 48161dcc4a Yet another approach to EC_LINE and EC_CONVERGING edit constraints. 2014-03-18 11:05:24 +01:00
Maciej Suminski f6959c039c Comments. 2014-03-18 11:04:52 +01:00
unknown b436924380 Warning removal, patches from Camille 019 2014-03-16 18:40:23 +01:00
Maciej Suminski 40ee66f8c5 ZONE_CONTAINERs are drawn as outlines while being edited using the POINT_EDITOR. 2014-03-14 16:05:30 +01:00
Maciej Suminski 19a87ac780 Added EC_CONVERGING for zone areas modification. 2014-03-14 15:37:55 +01:00
Maciej Suminski d6c1670cd7 Templated EDIT_POINT_CONSTRAINT.
Removed EDIT_CONSTRAINT::Update() - replaced with resetting constraints.
EDIT_CONSTRAINT is stored in EDIT_POIN using boost::shared_ptr instead of pointer.
Added EDIT_LINE::GetEnd() & GetOrigin(). Overridden ApplyConstraint() for EDIT_LINE.
Side EDIT_POINTS for zones are drawn as circles.
2014-03-14 15:15:38 +01:00
jean-pierre charras ab27f56cc7 Doc update 2014-03-14 08:37:04 +01:00
Marco Serantoni bc707ced58 [MacOSX] Pcbnew crash on editing dimension's line width 2014-03-14 02:10:27 +01:00
Maciej Suminski 85e8b8bd87 Yet another approach to 45 degree constraints. 2014-03-13 11:48:19 +01:00
jean-pierre charras d00fae588a Footprint Editor: fix a crash when the dialog to set pad properties is called from the main toolbar (i.e. to define the default setting for new pads, and not to edit an existing pad) 2014-03-13 08:15:19 +01:00
Maciej Suminski 52791f2375 Changed cast from float to double in RN_POLY::HitTest. 2014-03-12 22:42:08 +01:00
Maciej Suminski f9d5f584cb Fixed 45 degree mode toggle. 2014-03-12 17:50:24 +01:00
Maciej Suminski a377c9c1bc Fixed erroneous hit testing for polygons in ratsnest for GAL. 2014-03-12 17:11:52 +01:00
Maciej Suminski afc56d3f6f Moved panning boundaries and scale limits from VIEW to VIEW_CONTROL. 2014-03-12 17:09:53 +01:00
Maciej Suminski c7e3887ba4 Fixed erroneous hit testing for polygons in ratsnest for GAL. 2014-03-12 15:00:14 +01:00
Maciej Suminski 55f9aaabd7 Workarounded SWIG problems (does not support nested C++ classes, more on the subject: http://www.swig.org/Doc1.3/SWIGPlus.html#SWIGPlus_nested_classes). 2014-03-12 14:58:49 +01:00
Maciej Suminski e5b0c720ed Switched order of EDIT_POINTs for DIMENSION, so in case when feature lines are of 0 length, then still can be stretched. 2014-03-12 10:53:42 +01:00
Maciej Suminski e6571f6862 Added new constraint for EDIT_POINTs (EPC_LINE).
Dimensions have EDIT_POINTs.
Different handling of 45 degree mode in POINT_EDITOR.
2014-03-12 10:46:11 +01:00
Maciej Suminski f0251ebdb6 Merge selection tool branch. 2014-03-11 20:45:01 -04:00
Maciej Suminski d2ed2efc85 Workarounded SWIG problems (does not support nested C++ classes, more on the subject: http://www.swig.org/Doc1.3/SWIGPlus.html#SWIGPlus_nested_classes). 2014-03-11 14:50:53 +01:00
Maciej Suminski 54bf21768c Added a few settings to make the layer settings more similar to KiCad defaults (moved vias to VIA_THROUGH_VISIBLE, added a few rules for required layers). 2014-03-11 10:58:58 +01:00
Marco Serantoni 5feddb8cac [MacOSX] fixes some interations with KicadOSXBuilder 2014-03-10 23:37:59 +01:00
Maciej Suminski 5ac6579a87 Cursor snaps to EDIT_POINTs.
Added POINT_EDITOR::isModified().
2014-03-10 16:25:40 +01:00
jean-pierre charras 4fd3dbb5a5 Finishing work on a better 3D viewer. this also fix bugs like Bug #1129630 . 2014-03-09 19:43:53 +01:00
jean-pierre charras f24bc87a84 Pcbnew: fix Bug #1289416 (Broken setting of layer list in D_PAD:: ViewGetLayers() for GAL). 2014-03-08 20:07:35 +01:00
jean-pierre charras 63401f3d95 Rework on 3D viewer (work in progress): Disable or enable layers, grid or 3D footprint shapes should be now faster. 2014-03-08 20:04:23 +01:00
Wayne Stambaugh c89d52ee1a Pcbnew: make block rotate honor the rotation angle setting. (fixes lp:1281605)
* Make block rotate command honor the rotation angle setting.  Thank you
  Umesh Mohan <mohan.umesh@gmail.com> for the patch.
* Change block rotate undo command from UR_ROTATE to UR_CHANGED so consecutive
  rotations do not lead to round errors and for proper undo in case the user
  changes the rotation angle setting between block rotations.
2014-03-07 17:34:54 -05:00
Maciej Suminski 3927c667cc Added documentation. Moved some functions from .h to .cpp files. 2014-03-07 10:26:33 +01:00
Wayne Stambaugh 339dd0daf2 Coding policy fixes. 2014-03-06 13:38:39 -05:00
Maciej Suminski 88a0311afe Added EDIT_LINEs for dragging zone outlines. 2014-03-06 17:34:04 +01:00
Maciej Suminski 8c43c216bb 45 degrees mode for POINT_EDITOR. 2014-03-06 14:41:25 +01:00
Maciej Suminski 2889a7a13a Undo/redo support for POINT_EDITOR. 2014-03-06 12:36:20 +01:00
Maciej Suminski f72aec25c0 Auto zone refilling after using the POINT_EDITOR.
Minor code cleaning.
2014-03-06 11:49:08 +01:00
Maciej Suminski b6e3b3a3f9 Merged selection_tool branch. 2014-03-06 10:43:40 +01:00
Maciej Suminski 5ed0980dd5 Merged upstream. 2014-03-06 09:42:16 +01:00
Maciej Suminski 3cb168be5a Removed warnings. 2014-03-06 09:14:06 +01:00
jean-pierre charras a1b065c190 Fix a minor bug I created in commit 4733 2014-03-05 18:57:13 +01:00
jean-pierre charras 764b5c11bf Minor code cleanup in 3d viewer (remove dead or useless code). Some minor other fixes. 2014-03-05 18:40:23 +01:00
Maciej Suminski b8e3ff8ca3 Fixed undo while PNS is active. 2014-03-05 16:44:08 +01:00
Maciej Suminski c557e52dab Squashed memory leaks. 2014-03-05 14:57:14 +01:00
Maciej Suminski 505b38416d Removed a few memory leaks. 2014-03-03 17:15:41 +01:00
Martin Janitschke b33fa0cc13 Pcbnew: add option to merge non-plated through holes to drill file. (fixes lp:1133330) 2014-03-03 09:28:05 -05:00
Maciej Suminski 36813fe8ab Pcbnew: fixed SIGFPE arithetic exception. (fixes lp:128339, 1285969, and 1286426) 2014-03-02 20:18:26 -05:00
Martin Janitschke 7c3918da2a Pcbnew: fix global deletion bug and minor dialog changes. (fixes lp:1263795)
* Handle different item global deletions correctly.  No more removing of text
  if graphics is selected.
* Layer settings are always obeyed for modules, zones, text, and graphics.
* Text will be removed from copper layers if all layers are selected or
  according to the current layer.
* Added check boxes for "normal" and "locked" footprints to be consistent
  with the naming for the track deletion options.
2014-03-01 12:20:22 -05:00
jean-pierre charras 47e5026cfe 3D viewer: fix mirroring issue for texts in flipped footprints. 2014-02-28 18:46:18 +01:00
Fabrizio Tappero 9c71f62e1c Commit patch about cvpcb, pcbnew and layout editor menu items, with 3 menu labels modified in Eeschema. 2014-02-28 18:31:00 +01:00
Maciej Suminski 24c9b705a3 Zones are supported by POINT_EDITOR. 2014-02-28 18:24:29 +01:00
Maciej Suminski d1ffaf0deb Circles are supported by POINT_EDITOR. 2014-02-28 18:24:13 +01:00
Maciej Suminski 3c656691cf Fixed POINT_EDITOR crash on GAL change / board reload. 2014-02-28 17:20:10 +01:00
Maciej Suminski f87f12e222 Added TOOL_ACTION for updating EDIT_POINTS.
EDIT_POINTs show up when there is only one item selected (now after deselection as well).
2014-02-28 16:53:28 +01:00
Maciej Suminski c5c83bd271 Added TOOL_MANAGER & ACTION_MANAGER::RunAction( const TOOL_ACTION aAction ).
Selection clearing is invoked using TOOL_ACTION object rather than its name.
2014-02-28 15:46:05 +01:00
jean-pierre charras 4a461cd09b 3D viewer: shows now the texts of footprints (ref, value and others) when visible.
Fix also other very minor issues.
Realistic mode shows or not the copper thickness (depending on selected option in preferences) to speed up the screen redraw.
2014-02-28 11:51:47 +01:00
Maciej Suminski 41397f5b5b Fixes ratsnest crashing on zones with negative net codes. 2014-02-28 11:12:55 +01:00
Marco Serantoni 9413b30567 Fix for bug #1285878, build fails with clean repository and high parallelism due missing dependance between router and pcbcommon 2014-02-27 23:56:16 +01:00
Martin Janitschke 29e7638a3c make microwave toolbar accessible from menu (Bug #1285425 ) 2014-02-27 19:48:18 +01:00
Maciej Suminski 94cfed4b9e Initial version of POINT_EDITOR. 2014-02-27 17:29:08 +01:00
Maciej Suminski 235da6084b SELECTION_TOOL emits event notifying about selecting/deselecting/clearing selection. 2014-02-27 17:27:58 +01:00
Maciej Suminski e6598e9d41 Added VIEW::ToWorld( double ).
TOOL_EVENT message is supposed to contain string as parameter.
Added missing header for class_drawsegment.h (KiROUND).
Renamed SELECTION_TOOL::containsSelected() to SELECTION_TOOL::selectionContains().
2014-02-27 16:13:27 +01:00
Marco Serantoni e009721982 [MacOSX] Avoid race between cmake -E copy_directory, which triggers a build error when using an high parallelism 2014-02-26 21:46:25 +01:00
jean-pierre charras fbecc0d9ce * fp_lib_table.cpp: fix an issue on Windows in ConvertFromLegacy: sometimes, because the comparison was case sensitive, lib nicknames were not found, although libs exist ( for instance if a path was given like f:\mypath instead of F:\mypath)
* getpart.cpp: fix a potential bug on a translatable string with has requirements in spelling.
* fix bug  #1066179
* kicad: fix erroneous labels in sub menus.
2014-02-26 15:06:24 +01:00
Maciej Suminski a42a83a394 Minor changes to BRIGHT_BOX class. 2014-02-25 18:08:33 +01:00
Maciej Suminski c5a3c1082a Removed a few RecacheAllItems() calls, some of them changed to specific type recaching (using TYPE_COLLECTOR & VIEW_ITEM::ViewUpdate() ).
Removed OPENGL_GAL::SetStrokeColor().
2014-02-25 14:28:09 +01:00
Maciej Suminski f7d00a393b Renamed BOARD_CONNECTED_ITEM::GetNet() -> GetNetCode()
Renamed BOARD_CONNECTED_ITEM::SetNet() -> SetNetCode()
Added BOARD_CONNECTED_ITEM::GetNet() for accessing NETINFO_ITEM* of a given item.
Fixed module editor crash when launched to edit a module from a PCB.
Replaced some BOARD::FindNet( item->GetNet() ) calls with BOARD_CONNECTED_ITEM::GetNet().
2014-02-25 11:47:27 +01:00
Maciej Suminski 75026d8754 Renamed BOARD_CONNECTED_ITEM::GetNet() -> GetNetCode()
Renamed BOARD_CONNECTED_ITEM::SetNet() -> SetNetCode()
Added BOARD_CONNECTED_ITEM::GetNet() for accessing NETINFO_ITEM* of a given item.
Fixed module editor crash when launched to edit a module from a PCB.
Replaced some BOARD::FindNet( item->GetNet() ) calls with BOARD_CONNECTED_ITEM::GetNet().
2014-02-25 11:40:34 +01:00
Maciej Suminski d583280bb0 Minor code cleaning and optimizations. 2014-02-24 14:31:55 +01:00
Maciej Suminski de637d2b8d Fixed a missing group clearing and update for restored VIEW_ITEMs.Fixed a missing group clearing and update for restored VIEW_ITEMs. 2014-02-24 12:56:47 +01:00
Maciej Suminski 1c253bfba0 Some variables initialized to NULL. 2014-02-24 11:17:49 +01:00
Marco Serantoni d475c544c8 [MacOSX] Fixing resize issue in layer setup dialog 2014-02-21 17:38:29 +01:00
Maciej Suminski 5ac699776d Revisiting GAL:
- VIEW_ITEM::ViewUpdate() does not update items immediately. Now it marks them to be updated and the real update occurs on the next rendering frame.
- VIEW::InvalidateItem() made private.
- VIEW_LAYER::enabled -> visible
- Some functions moved to header files.
2014-02-21 16:57:18 +01:00
Maciej Suminski 151826b206 Upstream merge. 2014-02-21 11:05:28 +01:00
Maciej Suminski 8a8e5d8d14 Quick fix for unsupported pad types in PNS router. 2014-02-21 09:53:10 +01:00
Marco Serantoni 932c92af55 [MacOSX] New reorg for building system, typos and path refines 2014-02-19 22:39:21 +01:00
Maciej Suminski 87785441bc Removed some excessive variables. 2014-02-19 15:20:42 +01:00
Maciej Suminski 57c69b41db Continous mode for drawing tools (i.e. they do not finish after adding a single object). 2014-02-19 13:51:32 +01:00
Marco Serantoni 7da13137da [MacOSX] Fix for bugs #1258081 and #1267772 2014-02-18 21:30:17 +01:00
jean-pierre charras fd2afec6f5 Remove some fully outdated code (#pragma, from Henner Zeller's report, and some other things) 2014-02-18 12:41:53 +01:00
Marco Serantoni fcd17a59ee [MacOSX] Fix some small issues, this should be the least for scripting 2014-02-17 19:58:03 +01:00
Maciej Suminski a802ca87e0 Added TOOL_ACTION for PNS router activation.
Most of the GAL tools are activated by corresponding buttons on the right toolbar.
Removed menu entry for PNS router (as it is activated as the usual "Add track" tool).
2014-02-17 18:21:00 +01:00
Maciej Suminski e14d9aaf8f Fixed wrongly formulated assert. 2014-02-17 17:20:44 +01:00
Maciej Suminski 05de84d542 Undo/redo support. 2014-02-17 14:53:01 +01:00
Maciej Suminski 6e52e19367 Small leak fix. 2014-02-17 14:36:51 +01:00
Maciej Suminski f82e07849b Improved way of drawing 45-degree lines. 2014-02-17 11:33:03 +01:00
Maciej Suminski 9b1eb35472 Pcbnew: fix OpenGL PNS router track not shown bug. (fixes lp:1275319) 2014-02-15 18:54:51 -05:00
Marco Serantoni fb9e5b94ca [MacOSX] support for plugins in the bundle 2014-02-15 11:01:27 +01:00
Cirilo Bernardo d5064b98a4 Export VRML and IDF maintenance.
Fix minor bug in eeschema (opening a relative path does not work) (patch from HennerZeller).
2014-02-15 08:39:06 +01:00
Marco Serantoni 1c5a997f82 [MacOSX] Reorg and preparation to include scripts into Bundles 2014-02-14 22:09:48 +01:00
Maciej Suminski c1c8f54e8b Added a few asserts. Made some steps idiotproof. 2014-02-14 15:52:13 +01:00
Maciej Suminski 9d3f7230ee New items are created using pointers (instead of copying automatic variables when drawing is finished). 2014-02-14 15:13:42 +01:00
Maciej Suminski b1fb59ad13 Refactorization: moved drawing 45 degree multiple line to a function. 2014-02-14 14:24:12 +01:00
Maciej Suminski a7cb90deb8 Some more minor refactorization. 2014-02-14 11:35:48 +01:00
Maciej Suminski b7d4377621 Refactoring: zones and keepout areas are drawn using the same function. 2014-02-14 10:47:43 +01:00
Maciej Suminski 2b62a85263 Refactoring: made VIEW, VIEW_CONTROLS, BOARD and PCB_EDIT_FRAME fields in DRAWING_TOOL. 2014-02-14 09:49:49 +01:00
Maciej Suminski 597e98dbf4 Cursor is in world coordinates. 2014-02-13 20:23:28 +01:00
jean-pierre charras 63eac42d07 Fix a minor error in class D_PAD: void D_PAD::Flip( int Y ) changed to virtual void D_PAD::Flip( const wxPoint& aCentre ) (as defined in BOARD_ITEM)
Scripting: fix compatibility current pcbnew version in 2 examples and the default extension of board files  in board.i (was .kicad_brd, now is .kicad_pcb)
2014-02-13 18:27:48 +01:00
Maciej Suminski 3106d25361 Added keepout areas drawing tool. 2014-02-13 16:24:33 +01:00
Maciej Suminski fce753ba24 Added zone drawing tool. 2014-02-13 16:10:32 +01:00
Maciej Suminski 042b6a1002 Changed PCB_EDIT_FRAME::setTopLayer() to PCB_EDIT_FRAME::SetTopLayer() and changed to public (as it had exactly the same functionality). 2014-02-13 15:57:57 +01:00
Maciej Suminski 45c5a3de7f Placing modules with a minor bug. 2014-02-13 12:46:39 +01:00
Miguel Angel Ajo 3329ed26f3 switching to the new python scripting console icon 2014-02-12 22:19:12 +01:00
Maciej Suminski ba1867fe0e Merged fix from the selection_tool branch. 2014-02-12 18:04:27 +01:00
Maciej Suminski ec763dfede NETINFO_ITEM for orphaned items now have empty netname and net code = 0 (to avoid problems).
Fixed case for the footprint legacy plugin when added module's do not have set parent (BOARD).
Added copyright notice for pcbnew/class_netinfolist.cpp (feel free to correct, it is just copied from corresponding header file).
2014-02-12 18:01:03 +01:00
jean-pierre charras 29a1bdb32a Fix issues in print mirror. (include some changes coming from Cirilo Berdarno's patch)
gr_basic.cpp: rewrite the function which draws the outlines of a thick segment.
2014-02-12 11:03:34 +01:00
Nick Østergaard f214a57629 Fix wrong numbering in the QFP footprint wizard python script 2014-02-12 08:59:56 +01:00
Fabrizio Tappero 7061d6c2a5 Icon update, and an other very minor fix. 2014-02-11 19:32:09 +01:00
Maciej Suminski 87d3458ea9 Added PCB_TARGET placing tool. 2014-02-11 17:15:33 +01:00
Maciej Suminski c09e8ade2a Fixed ratsnest related segfaults on BOARD destruction. 2014-02-11 14:39:14 +01:00
Maciej Suminski ae5fa23285 Added DIMENSION drawing tool. 2014-02-11 14:38:44 +01:00
Maciej Suminski e6a01e5a41 Fixed ratsnest related segfaults on BOARD destruction. 2014-02-11 14:26:33 +01:00
Maciej Suminski 46db6ac182 Removed redundant fields DIMENSION::m_arrowD1O, m_arrowD2O, m_arrowG1O, m_arrowG2O (==m_crossBarO/F).
Added DIMENSION::SetOrigin(), DIMENSION::SetEnd(), DIMENSION::GetOrigin(), DIMENSION::GetEnd(), DIMENSION::GetHeight().
Fixed flipping for DIMENSION class.
Added an information that helps to understand roles of the points in the DIMENSION class.
Some minor changes to PCB_PAINTER (mainly using const COLOR4D& for taking the result of GetColor() function).
2014-02-11 13:22:30 +01:00
Lorenzo Marcantonio 29dcb49c62 - Do not autonumber NPTH pads on add in module editor (keep the number blank)
Factored out the next-pad-number function
2014-02-10 18:19:15 +01:00
Maciej Suminski 2aef11a5fc Made rotate & flip tool actions generic.
Drawing tool reacts to rotate & flip events while placing a text.
2014-02-10 17:08:55 +01:00
Maciej Suminski 4b27778451 Basic text placing tool. 2014-02-10 15:40:25 +01:00
Maciej Suminski 02316e02c3 Drawing arcs - version 1 2014-02-10 10:58:58 +01:00
jean-pierre charras c935624779 Use environment KISYS3DMOD to know defaut path for 3D shapes in footprint editors dialogs. 2014-02-10 10:30:08 +01:00
Miguel Angel Ajo bbcd2c61d6 BOARD saving test 2014-02-09 00:21:47 +01:00
Marco Serantoni 2acaa2871d [MacOSX] Fixing build system, sorry guys, refining build system and make building smoother. 2014-02-08 16:15:06 +01:00
jean-pierre charras fff54d759e Add the environment variable KYSYS3DMOD to define a default path for 3D models. 2014-02-08 11:44:55 +01:00
Maciej Suminski 222017758c Moved PCB_VISIBLE size check to .cpp. 2014-02-07 20:54:58 +01:00
Maciej Suminski 9ef713dfa8 Right click on an item when there is nothing selected - enables the context menu. 2014-02-07 20:44:34 +01:00
jean-pierre charras d6f348f41e Remove duplicate icon apply.svg (use ckecked_ok.svg instead which is the same icon).
Add a workaround to fix a new bug in wxWidgets 3.0 ( Windows specific ) which shows icons only with a size = 16x16 in menus which have attribute wxITEM_CHECK
2014-02-07 20:32:08 +01:00
Marco Serantoni c441c287b0 [MacOSX] Fixing minor issue for wxPython 2014-02-07 20:19:53 +01:00
Maciej Suminski 63e4defd2a Corrected bounding box for arcs (DRAWSEGMENT). 2014-02-07 19:55:40 +01:00
Marco Serantoni eb34364d89 [MacOSX] Automating building for OSX with KICAD_SCRIPTING, see Documentation/compiling/mac-osx.txt 2014-02-07 19:53:54 +01:00
Maciej Suminski 0dadf3bc7c Corrected bounding box for arcs (DRAWSEGMENT). 2014-02-07 19:51:04 +01:00
Cirilo Bbernardo 87d2caa4c6 IDF export: fix incorrect rotation of flipped items. 2014-02-07 17:01:46 +01:00
Maciej Suminski 25dfbcd39f Upstream merged. 2014-02-07 09:52:47 +01:00
Maciej Suminski d124cf45f3 Reverted changes introduced by the revision 4655. 2014-02-06 21:34:03 +01:00
Maciej Suminski 45f55fb8c5 Actually added files for drawing tools. Added possibility of drawing circles. 2014-02-06 17:12:37 +01:00
jean-pierre charras f366f26523 Fix some incorrect icons (which were using a not supported font for texts). Add ps_router icon from Konstantin Baranovskiy. 2014-02-06 15:13:31 +01:00
Maciej Suminski b21ce73c37 Initial version of the drawing tool. 2014-02-06 15:09:38 +01:00
Maciej Suminski 363709e7a9 Added TOOL_INTERACTIVE::Activate().
Removed an unnecessary header from class_board_item.h.
2014-02-06 14:45:33 +01:00
Maciej Suminski 5c9e7d9b9b Merged the lp:~cern-kicad/kicad/selection_tool branch. 2014-02-06 12:48:18 +01:00
Maciej Suminski 8944e92456 Fixed included headers. 2014-02-06 12:38:47 +01:00
Maciej Suminski 468e14f003 Merged ratsnest_threadsafe branch. 2014-02-05 11:55:04 +01:00
Maciej Suminski 3a15f5ad28 Initialized value to suppress Valgrind warnings. 2014-02-05 11:33:45 +01:00
Maciej Suminski 17c030aa98 Fixed removal of items in the KiCad-default style. 2014-02-05 11:08:34 +01:00
Maciej Suminski 857956e42e Fixed bug introduced in the last commit. 2014-02-05 10:47:55 +01:00
Maciej Suminski d7517e472b Some items were still marked as selected after undoing an operation. 2014-02-05 10:30:50 +01:00
Cirilo Bernardo fbe8484225 Apply IDF tools patch from Cirilo Bernardo 2014-02-05 10:27:21 +01:00
Maciej Suminski a9031edc0d Grip margin is relative to the world's zoom. 2014-02-05 10:17:14 +01:00
Maciej Suminski f922533978 Added possibility for editing pads properties. 2014-02-05 09:05:27 +01:00
Maciej Suminski 8df0f769f7 Added KiCad-style modification methods (hover over an item and press a hot key, without selecting first).
Modification point is selected basing on the number of selected items.
Rotation angle setting (Preferences->General) is taken into account while rotating.
2014-02-04 17:27:00 +01:00
Maciej Suminski 625dcddb27 Added 2 tool actions:
- pcbnew.InteractiveSelection.Single for selecting a single item
- pcbnew.InteractiveSelection.Clear for clearing the selection
Made SELECTION_TOOL::clearSelection private.
2014-02-04 16:03:56 +01:00
Maciej Suminski 106fa9bbd8 Edit tool may still be activated if it was invoked with no selected items. 2014-02-04 14:21:29 +01:00
Maciej Suminski 347649e855 Protection against non consecutive net codes. 2014-02-04 13:40:39 +01:00
Maciej Suminski 82ca611ed3 SELECTION_TOOL::SELECTION::Clear made private, as there was no chance to call it outside the SELECTION_TOOL class. 2014-02-04 11:37:54 +01:00
Dick Hollenbeck 142782b402 remove wxApp()::FindLibraryPath() usages from Pcbnew. Use environment variable substitution. 2014-02-03 15:39:42 -06:00
Maciej Suminski f87b6962e0 Enabled PNS for selected items. 2014-02-03 18:09:17 +01:00
Maciej Suminski f6aa447036 Ratsnest lines for zones are removed when a zone is dragged. 2014-02-03 17:40:39 +01:00
Dick Hollenbeck 4f26386e8d Initial KIWAY (modular-kicad) work. Various tweeks. 2014-02-03 09:10:37 -06:00
Maciej Suminski 3f5c3d4349 Minor changes (fix cvpcb build issue, wx2.8 compatibility, some other stuff). 2014-02-03 16:02:54 +01:00
Maciej Suminski 63bc40b58e Takes into account hidden module text settings. 2014-02-03 07:22:31 -06:00
Maciej Suminski fff616c8dc Moved netnames (GAL specific layers) to a separate enum, to avoid saving/reading their settings from files.
Added a check for the number of PCB_VISIBLE elements.
Worksheet & general purpose overlay layers are visible by default.
2014-02-03 14:14:53 +01:00
Maciej Suminski 2fe85cf43d Minor changes. 2014-02-03 13:26:25 +01:00
Maciej Suminski 864c86062d Changed ROUTER_PREVIEW_ITEM layer. 2014-02-03 13:09:10 +01:00
Maciej Suminski db252ea88c Changed BOARD_DESIGN_SETTINGS::m_VisibleElements from int to long, to assure at least 32 bits length (without depending on the platfrom int size). 2014-02-03 13:08:01 +01:00
Maciej Suminski 44861f5889 Fixed tracks of 0 width causing division by 0 error. 2014-02-03 13:05:27 +01:00
Miguel Angel Ajo 15bfac3f4e Moved QA to root. 2014-02-02 22:50:45 +01:00
Dick Hollenbeck 741bfb685b Another attempt at wxFrame::SaveSettings() standard infrastructure. 2014-02-02 14:18:10 -06:00
Cirilo Bernardo 5a6665ec08 Dxf import fix (patch from Cirilo Bernardo, with a minor change) 2014-02-02 10:07:02 +01:00
Carl Poirier 1490099ddd Parallelized the RN_DATA::Recalculate() function. 2014-01-31 18:27:06 +01:00
Maciej Suminski 0c67e26e9c Added the dynamic ratsnest for the tracks that are currently routed with the PNS router. 2014-01-31 18:05:11 +01:00
Maciej Suminski 3e2e11fb42 Undo/redo buffer fixed once again.. 2014-01-31 16:08:20 +01:00
Maciej Suminski 24ba75ba92 Minor change to clearing selection handling. 2014-01-31 14:52:01 +01:00
Maciej Suminski 630a3fb1b9 Safer RN_NET::GetNodes() 2014-01-31 14:41:15 +01:00
Maciej Suminski 7f3bf1bef7 Added missing operators==/!= for RN_NODE_PTR.
Moved ClearSimple() functions back to the header file.
2014-01-31 13:19:59 +01:00
Maciej Suminski 7f4648149b Ratsnest is updated after backend switch. 2014-01-31 13:14:18 +01:00
Maciej Suminski 3827f495ca Ratsnest color is saved in RENDER_SETTINGS. Temporary ratsnest is drawn using a brightened color. 2014-01-31 11:16:01 +01:00
Maciej Suminski 5fea60d20f Fixed undo/redo while routing with the PNS error. 2014-01-30 17:11:40 +01:00
Maciej Suminski 510fee1358 Another way of handling items for the ratsnest (clearer and now finally supports undo/redo of the PNS created tracks). 2014-01-30 15:46:39 +01:00
Maciej Suminski bbb3972fb7 Undo buffer for the PNS router. Still, it has a bug - it crashes when an undo/redo operation is performed while routing a track. 2014-01-30 11:32:08 +01:00
Maciej Suminski a73e386505 Added a new tool event: TA_UNDO_REDO, sent after undo/redo operation is issued. 2014-01-30 11:18:58 +01:00
jean-pierre charras ce6b907fe3 Add specific bitmaps in export IDF and export DSN menus.
Add missing calls to Show( false ) to some main frames (Kicad, eeschema, gerbview), to force config saving when closing these windows.
Code cleanup and minor coding style fixes  in footprint_wizard_frame
2014-01-29 18:01:42 +01:00
unknown 690a001648 Pcbnew: export IDF fixes 2014-01-29 17:42:21 +01:00
Maciej Suminski 57bfaca131 PNS_ITEM::m_parent: BOARD_ITEM->BOARD_CONNECTED_ITEM 2014-01-29 15:35:25 +01:00
Maciej Suminski af350eb1e6 RN_DATA::GetNets() -> RN_DATA::GetNet() with an assert to check if someone calls it for the unconnected net.
Only items that belong to a net are removed from ratsnest.
2014-01-29 15:24:19 +01:00
Maciej Suminski b52e5fabda Ratsnest lines are drawn using a more transparent color.
BOARD::chainMarkedSegments() uses a safer method for gettings pads.
2014-01-29 14:51:50 +01:00
Maciej Suminski bec24b6c7f Ratsnest is updated after rotation, flip, undo/redo operations.
Fixed crashes of ratsnest when a pointer for an item has changed after undo/redo operations.
Vias are properly removed from ratsnest (pcbnew/class_board.cpp).
2014-01-29 10:17:14 +01:00
Maciej Suminski 83f7c7e35e Added RN_DATA::Add()/Remove() methods.
RN_DATA::Update()/AddSimple() take BOARD_ITEM* as the parameter (instead of being split to versions with BOARD_CONNECTED_ITEM* and MODULE*), to make the code look clearer.
2014-01-28 16:30:58 +01:00
Maciej Suminski 2b8f9fc621 Added BOARD_[CONNECTED_]ITEM::IsConnected() for checking if a BOARD_ITEM is BOARD_CONNECTED_ITEM as well. 2014-01-28 16:23:08 +01:00
Maciej Suminski c3c7b2e9cc Merged the netnames branch. 2014-01-28 11:59:04 +01:00
Maciej Suminski 7f6bc781aa Upstream merge. 2014-01-28 10:43:55 +01:00
Maciej Suminski 15b8d3d20a Added NETINFO_MAPPING, to ease saving nets with consecutive net codes (without modifying the net codes during the run time).
Now, nets are saved with consecutive net codes (both modern & legacy plugins).
Zones are saved together with their nets, without depending on the fact if there are any pads with such net. Therefore validation of zone net names was removed (pcbnew/class_board.cpp).

Performed tests:
- Changed a pad's net name from empty to existent - ok, name was changed.
- Changed a pad's net name from empty to nonexistent - ok, error message is displayed, net name stays empty.
- Changed a pad's net name from existent to empty - ok, net name became empty
- Changed a pad's net name from existent to nonexistent - ok, error message is displayed, net name is not changed.

- Drawn a zone that belongs to a net, then modified schematics so the net does not exist anymore. After reloading the net list, all pads/tracks are updated. Zones still belongs to the net that does not exist in the schematic (but still exists in .kicad_pcb file). After running DRC, the zone becomes not filled.
- Undo & redo affects assignment of a polygon to a specific net (you may change net of a polygon, refill it and undo/redo the changes).

- KiCad s-expr & legacy, Eagle, P-CAD boards seem to load without any problem (they also contain correct net names assigned to the appropriate pads). All types of board file formats were loaded, then saved in sexpr format and reopened with a KiCad built from the master branch (without my modifications).
- A few boards were also saved using the legacy format and were opened with the master KiCad without any issues.

- Change a net name for a pad, restore with undo/redo - ok
- Remove everything, restore with undo - ok
- Remove everything, reload netlist - ok

Differences observed between files saved by the master branch KiCad and this one:
- list of nets are not saved in any particular order, so net codes may differ
- the default net class does not contain the unconnected net
2014-01-28 10:19:51 +01:00
Dick Hollenbeck c63fa6ff31 Add EDA_BASE_FRAME::Show() and call SaveSettings() only from there for all derived wxFrames. Remove calls to SaveSettings() elsewhere. 2014-01-27 19:29:26 -06:00
Dick Hollenbeck 9bce766331 Report findings of possible github zipfile caching in a comment, improve a Sprintf() setup. 2014-01-27 09:51:14 -06:00
Maciej Suminski a10d918cac Thread-safe version of Delaunay triangulation. 2014-01-27 11:42:47 +01:00
jean-pierre charras e07b4cbe86 github_plugin.cpp: in error message relative to"cannot get zip archive...", line 496, make the sentence relative to http GET command not translatable
inside the full translated message.
2014-01-27 09:48:17 +01:00
Dick Hollenbeck 9afc4a0db6 Remove g_LibraryNames and all supporting infrastructure from pcbnew. FP_LIB_TABLE is now local to major wxFrames. 2014-01-27 01:23:02 -06:00
Dick Hollenbeck 6617ce58f3 Use factored SelectLibrary() from base class. Spelling and comments. 2014-01-27 00:41:40 -06:00
Maciej Suminski 8e6019748a GAL takes into account hidden module text settings. 2014-01-26 22:02:48 +01:00
Maciej Suminski e537480f1e Fixes crash when there are no edges for a given net in the ratsnest. 2014-01-26 22:01:42 +01:00
jean-pierre charras fe97521bda Pcbnew: fix Bug #1272926 (Texts are now not accepted on edge cuts layer) 2014-01-26 18:30:20 +01:00
jean-pierre charras 3354bdde05 Pcbnew: fix bug #1272714 . Code cleanup: use 2 different enums for pad shapes and pad drill shapes. Remove never used pad shape. 2014-01-26 15:20:58 +01:00
jean-pierre charras f7ca6e4bf9 add patch from Cirilo Bernardo, and minor fixes. 2014-01-25 13:23:29 +01:00
Dick Hollenbeck aa451fb4d1 freerouter does not understand "mixed" layers, export mixed as signal 2014-01-20 13:11:42 -06:00
jean-pierre charras a094f7d5b5 Fix some issues in modview, relative to few incorrect use of some wxAuiManager functions.
Fix not working + and - keys in layers manager.
Fix typo errors and modify some messages to make translator's life more easy.
2014-01-19 14:12:57 +01:00
maciej. 76aa0ba756 Fix compile errors when wx3.x is built with --enable-stl 2014-01-18 03:07:05 -06:00
Maciej Suminski 441e03172c Added iterators for NETINFO_LIST (as net codes for existing net codes may be not consecutive). 2014-01-16 16:47:31 +01:00
Maciej Suminski af7520ccb9 wxWidgets 2.8 fix 2014-01-16 14:36:09 +01:00
Maciej Suminski 8a4e723504 NETINFO_ITEMs are not stored in a vector anymore, instead they are held in a unordered_map. Now, the net codes may be not consecutive. There is another way for assigning net codes (using a static int that holds a possible empty net code and a function that makes sure it is not used [getFreeNetCode()]).
Removed some unused fields (NETINFO_ITEM::m_NbNodes, m_NbLink, m_NbNoconn, m_Flag).
2014-01-16 14:20:51 +01:00
Maciej Suminski d62b47a0df BOARD_CONNECTED_ITEMs do not store net code anymore (m_NetCode field), instead net info is stored using a pointer to NETINFO_ITEM.
GetNet() refers to the net code stored in the NETINFO_ITEM. SetNet() finds an appropriate NETINFO_ITEM and uses it.
Removing GetNet() & SetNet() (and the whole net code idea) requires too many changes in the code (~250 references to the mentioned functions).
BOARD_CONNECTED_ITEMs by default get a pointer to NETINFO_ITEM that stores unconnected items. This requires for all BOARD_CONNECTED_ITEMs to have a parent (so BOARD* is accessible). The only orphaned item is BOARD_DESIGN_SETTINGS::m_Pad_Master, but it does not cause any issues so far.
Items that do not have access to a BOARD (do not have set parents) and therefore cannot get net assigned, by default get const static NETINFO_LIST::ORPHANED.

Performed tests:
- loaded .kicad_pcb, KiCad legacy board, Eagle 6.0 board, P-CAD board - all ok
- load a simple project, reload netlist after changing connections in eeschema - ok
- save & reload a board - ok, but still contain empty nets
- remove everything, restore with undo - ok
- remove everything, reload netlist - ok
- changing net names (all possibilites: empty->existing, empty->not existing, existing->empty, existing->not existing) - all ok
- zones: when net is changed to a net that does not have any nodes besides the zone itself, it does not get filled
2014-01-15 18:03:06 +01:00
Maciej Suminski 3017b61711 Added NETINFO_LIST::UNCONNECTED constant. 2014-01-15 09:34:16 +01:00
Maciej Suminski 78732f13f7 Removed:
- ZONE_CONTAINER::m_Netname field
- ZONE_CONTAINER::SetNetName()
- ZONE_CONTAINER::SetNet() [it uses the one in BOARD_CONNECTED_ITEM]
- ZONE_CONTAINER::GetNetName() [instead BOARD_CONNECTED_ITEM::GetNetname is used]
- ZONE_CONTAINER::SetNetNameFromNetCode()

Performed tests:
- Drawn a zone that belongs to a net, then modified schematics so the net does not exist anymore. After reloading the net list, all pads/tracks are updated. Zones still belongs to the net that does not exist in the schematic (but still exists in .kicad_pcb file). After running DRC, the zone becomes not filled.
- Undo & redo affects assignment of a polygon to a specific net (you may change net of a polygon, refill it and undo/redo the changes).
2014-01-14 11:41:06 +01:00
Maciej Suminski 654e7e556e Removed D_PAD::SetNetname() function and D_PAD::m_Netname, D_PAD::m_ShortNetname fields.
D_PAD::GetNetname() and D_PAD::GetShortNetname() were moved to BOARD_CONNECTED_ITEM. Now they use the net name stored in NETINFO_ITEM.
Moved some one-line functions from class_board_connected_item.cpp to class_board_connected_item.h.
Added a copyright notice, moved Doxygen comments from class_board_connected_item.cpp to class_board_connected_item.h.

I have some doubts if changes introduced pcbnew/dialogs/dialog_pad_properties.cpp do not break anything, but I could not find a test case that breaks the pcbnew.

Performed tests:
- changed pad's net name from empty to existent - ok, name was changed
- changed pad's net name from empty to nonexistent - ok, error message is displayed, net name stays empty
- changed pad's net name from existent to empty - ok, net name became empty
- changed pad's net name from existent to nonexistent - ok, error message is displayed, net name is not changed
- (re)reading netlists, including net changes - fine, changes are applied, but empty nets are still kept
- loaded pcbnew/pcad2kicadpcb_plugin/examples/CK1202_V1.pcb to test P-CAD import plugin - ok, net names are correct
- imported an Eagle 6.0 board (Arduino Uno; http://arduino.cc/en/uploads/Main/arduino_Uno_Rev3-02-TH.zip) then saved in .kicad_pcb format and reloaded - ok, net names are correct
- saved demos/video/video.kicad_pcb in legacy format and then loaded it again - ok, net names are correct
2014-01-14 10:41:52 +01:00
jean-pierre charras 5954910913 Fix some issues in modview, relative to some a bad use of some wxAuiManager functions. 2014-01-13 16:09:52 +01:00
jean-pierre charras f0412874c0 Update demo files. A minor code cleaning. 2014-01-10 21:12:36 +01:00
Maciej Suminski bf80cc770e Changed the way of looking up NETINFO_ITEM using net names (using boost::unordered_map). Added a hash function (wxString) for that. Introduced NETINFO_ITEM::GetNetItem( wxString ). BOARD::FindNet() uses the map.
Net codes are updated upon net list update. (BOARD::ReplaceNetlist())
Added in some places (mostly class_board.cpp) pad->SetNet() calls to synchronize net codes.
On creation of NETINFO_LIST, the first NETINFO_ITEM is added (the unconnected items net).
Removed COMPONENT_NET::m_netNumber, as it was not used anywhere.
Added an assert to D_PAD::GetNetname(), checking if net code and net name is consistent for unconnected pads. Added an assert for NETINFO_LIST::AppendNet() to assure that appended nets are unique.

It seems that at this point:
- Updating net lists works fine. The only difference between the file ouput is that after changes it contains empty nets as well.
- Nets are not saved in the lexical order. Still, net names and net codes are properly assigned to all items in the .kicad_pcb file. It is going to be addressed in the next commit. I believe it should not create any problems, as pads are sorted by their net names anyway (NETINFO_LIST::buildPadsFullList())

Performed tests:
- Created a blank PCB, saved as pic_programmer.kicad_pcb (from demos folder). Updated net lists. .kicad_pcb file (comparing to the results from master branch) differ with net order (as mentioned before), net codes and timestamps.
- Removed some of components from the above .kicad_pcb file and updated net lists. Modules reappeared. .kicad_pcb file differs in the same way as described above.
- Trying to change a pad net name (via properties dialog) results in assert being fired. It is done on purpose (as there is a call to GetNetname() and net name and net code do not match). This will not happen after the next commit.
- Prepared a simple project (starting with schematics). Imported net list, changed schematic, reimported net list - changes are applied.
- Eagle & KiCad legacy boards seem to load without any problem.
2014-01-10 18:04:07 +01:00
Maciej Suminski 386d1fc257 Made two functions immune to empty containers. 2014-01-10 17:19:33 +01:00
Maciej Suminski 487b609e76 Removed NETINFO_ITEM::SetNet() and NETINFO_ITEM::SetNetname() methods.
NETINFO_ITEM::m_Net and NETINFO_ITEM::m_Netname are const.

Changes to be verified:
- pcbnew/minimun_spanning_tree.cpp: It segfaults is m_Size == 0
- pcbnew/exporters/export_gencad.cpp: I removed the SetNetname() call, as it changes only the unconnected net and in the next line it returns if the net is unconnected. Still, I wonder if name for the unconnected net matters. What about tests that check if a net name is empty to decide if it is unconnected net or not.
2014-01-09 15:51:47 +01:00
jean-pierre charras f905b4697e Code cleanup: Pcbnew: move files relative to exort functions to the new folder exporters
all: remove include <protos.h>  from a lot of  files which do not need it.
2014-01-08 15:18:51 +01:00
Dick Hollenbeck 1c0f034bca Make KiCad compile with minimal warnings against SVN HEAD of wxWidgets as of today. 2014-01-07 19:34:04 -06:00
jean-pierre charras 710e6a56c4 Move files relative to export code to subdir exporters. 2014-01-07 21:41:32 +01:00
Maciej Suminski 8f054a606f Fixed snapping and ratsnest update for EDIT_TOOL. 2014-01-07 17:23:17 +01:00
Maciej Suminski 84412ce135 Delaunau triangulation algorithm was bailing out if run on an emprty container. 2014-01-07 15:52:10 +01:00
Maciej Suminski 6ad9d013e2 Safer way for syncing pads in Push and Shover router. 2014-01-07 14:23:46 +01:00
Maciej Suminski 75db0cebb7 Fixed Push and Shove and ratsnest cooperation (tracks added by PNS are taken into account while calculating ratsnest). 2014-01-07 14:22:37 +01:00
Maciej Suminski 69cf8aa325 Fixed snapping for Push and Shove router. 2014-01-07 14:21:37 +01:00
Maciej Suminski 3fe183c472 Tools have possibility to react to GAL switching or model (board) reload. 2014-01-07 14:16:47 +01:00
Maciej Suminski aaf857e894 Items removed from board are removed from ratsnest as well. Corrected the way of items removal from ratsnest. 2014-01-07 14:15:40 +01:00
Maciej Suminski bc71a2c007 Removed TOOL_STATE.idle field, as it was redundant. 2014-01-07 14:11:53 +01:00
Maciej Suminski 7784365b39 Fixed bounding box for module texts. 2014-01-07 14:09:27 +01:00
jean-pierre charras 714d5b28d2 Better vrml export, from Cirilo Bernardo. 2014-01-06 21:14:24 +01:00
Maciej Suminski 537d82fb98 Upstream merge. 2014-01-06 10:29:31 +01:00
Dick Hollenbeck 6b08cb4ca1 comment out broken tool_modview.cpp's useless footprint select button. somebody needs to fix this. 2014-01-03 17:19:54 -06:00
Cirilo Bernardo 6e56aa2ff0 IDF3 wxDateTime patch to fix MinGW builds for missing localtime_r(). 2014-01-03 08:31:50 -05:00
Cirilo Bernardo 0b853c5af2 Adds basic IDF3 export (board and cutouts / holes only) 2014-01-02 10:26:03 +01:00
Dick Hollenbeck c264823731 8 bit string relief via class UTF8 2014-01-01 20:17:07 -06:00
Dick Hollenbeck f346727214 FIX: only invoke fp-lib-table options editor when table not empty. 2013-12-31 10:59:33 -06:00
Marco Serantoni 4d139b590f [MacOSX] Adding better support for Retina Display (NSHighResolutionCapable) 2013-12-31 12:03:02 +01:00
Marco Serantoni 6e586d6996 Fixing typo 2013-12-30 01:36:57 +01:00
Marco Serantoni ea4bec99d0 [MacOSX]/All purpose - Support for static linking 2013-12-30 01:27:03 +01:00
jean-pierre charras 612e2ddb4a fix bugs 1264240, 1264247, 1264239, 1264233 (clang report errors) 2013-12-29 16:12:27 +01:00
jean-pierre charras a455ab4a90 Fix bugs 1264236, 1264238, 1264254 2013-12-29 12:01:54 +01:00
jean-pierre charras 46e82e4e18 Move HitTestForCorner and HitTestForEdge code from class_zone to polygon/PolyLine.cpp, to avoid redundant code.
Fix bug 1264248.
Fix a very minor issue in RemoveTrailingZeros, for countries where the separator in floating numbers is a comma.
2013-12-29 11:15:06 +01:00
jean-pierre charras ca60f0863a Dialog fp plugin option: Fix compil issue under gcc 4.4 (does not happen with 4.6 and later) about an overloaded function. 2013-12-27 12:44:40 +01:00
jean-pierre charras f9cc325bd8 Pcbnew, 3D viewer: fix incorrect position of multiline texts. 2013-12-27 08:24:36 +01:00
Dick Hollenbeck 517ca83fbc Hide m_galCanvas and m_galCanvasActive behind accessors. Fix DLIST concatonation API corner case. 2013-12-26 16:36:43 -06:00
Dick Hollenbeck b9c56b2fc4 FIX: avoid use of wxFileName::GetModificationTime() when it can fail. 2013-12-24 13:09:41 -06:00
jean-pierre charras c5031d3f62 specctra_export.cpp: Fix a conversion error from mils to mm I made i n may last commit, which set min dist to find a segment end for internal outlines holes to 1 mil instead of 10 mils. 2013-12-23 09:07:08 +01:00
jean-pierre charras d337d340ee Fix broken download_boost.cmake. Fix minor other issues:
dialog fp lib table display not updated (Windows specific) when an option is changed from the lib table option editor
overloaded function in dialog_fp_lib_table.cpp not compiled with gcc 4.4.7 (try to fix Bug #1262002).
specctra_export.cpp: set min dist to find segment ends when building the board outline to 2 microns (should break anything, but should be enough to fix rounding issues when creating/importing board outlines with arcs)
2013-12-22 20:02:04 +01:00
Marco Serantoni 057a947a4b [MacOSX] Fixing crash/missing refresh in pcb text 2013-12-22 18:39:37 +01:00
Marco Serantoni f3cfea9521 [MacOSX] Fixing crash when changing module text properties - bug #1230090 2013-12-22 18:29:57 +01:00
Maciej Suminski 578ecc6f45 Merge zone outline drawing fix request. 2013-12-22 11:30:46 -05:00