Commit Graph

100 Commits

Author SHA1 Message Date
Seth Hillbrand a240f88785 Eeschema: Remove wire under a placed component
CHANGE: In Eeschema, when placing a component directly over an existing
wire, the wire is automatically removed where it shorted pins.

This helps workflow in Eeschema, allowing one to quickly add components
to existing lines.

Fixes: lp:1678449
* https://bugs.launchpad.net/kicad/+bug/1678449
2017-12-03 18:42:57 -05:00
jean-pierre charras 3109343b96 Fix a compil issue with gcc 4.8.4
Fixes: lp:1735909
https://bugs.launchpad.net/kicad/+bug/1735909
2017-12-02 14:22:43 +01:00
Seth Hillbrand 069448f20e Eeschema: Automatically manage junctions
CHANGE: eeschema automatically adds and removes junctions
when required by the schematic

Fixes: lp:593888
* https://bugs.launchpad.net/kicad/+bug/593888

Fixes: lp:1482111
* https://bugs.launchpad.net/kicad/+bug/1482111

Fixes: lp:1563153
* https://bugs.launchpad.net/kicad/+bug/1563153

Fixes: lp:1730219
* https://bugs.launchpad.net/kicad/+bug/1730219

Fixes: lp:1491052
* https://bugs.launchpad.net/kicad/+bug/1491052
2017-11-30 10:02:24 -05:00
Seth Hillbrand b5ec5f9a73 Eeschema: Moving BreakSegment into SCH_EDIT_FRAME
BreakSegment now breaks a known segment and BreakSegments
breaks all segments. This allows functions to break a
segment without needing to iterate through the whole list.
2017-11-30 10:02:15 -05:00
Seth Hillbrand e9a297de5b Eeschema: Removing DC dependencies 2017-11-30 10:02:05 -05:00
Seth Hillbrand bf32cc2555 Eeschema: Moving SchematicCleanup to SCH_EDIT_FRAME
SchematicCleanup function moved from SCH_SCREEN to
SCH_EDIT_FRAME to allow access to the undo stack as we
are changing the schematic.
2017-11-30 10:01:58 -05:00
Seth Hillbrand c6632bdded Eeschema: Remove zero-length wires in RemoveBacktracks
RemoveBacktracks call removes zero-length wires as well
2017-11-30 10:01:50 -05: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
Chris Pavlina 67b4ba0225 eeschema: improve RemoveBacktracks() algorithm (lp:1562521)
Still isn't perfect, but removes an actual bug. It's still possible to get
weird things if you try hard, but they're not corrupt and don't trip
assertions. Consider a temporary fix.
2016-03-29 20:25:15 -04:00
Wayne Stambaugh 9685b3812d Eeschema: decouple SCH_SCREEN::SchematicCleanUp() from wxDC and EDA_DRAW_FRAME.
* Remove wxDC and EDA_DRAW_FRAME parameters from SCH_SCREEN::SchematicCleanUp()
  function call.
* Update all code that calls SCH_SCREEN::SchematicCleanUp() with wxDC and/or EDA_DRAW_FRAME
  parameters.
* Fix a display refresh bug when incrementally inserting bus entries created in my last commit.
  IsDanglingStateChanged() appears to be broke for bus entries.
2016-02-20 09:59:42 -05:00
Wayne Stambaugh 306b964b40 Eeschema: decouple SCH_SCREEN::TestDanglingEnds() from wxDC and EDA_DRAW_PANEL.
* Remove wxDC and EDA_DRAW_PANEL as parameters from function
  SCH_SCREEN::TestDanglingEnds().
* Change SCH_SCREEN::TestDanglingEnds() to return the connection change state
  rather than the dangling end status which wasn't used anywhere.
* Update all calls to SCH_SCREEN::TestDanglingEnds() to remove wxDC and
  EDA_DRAW_PANEL parameters and refresh connection indicators only if a
  connection state change occurred.
2016-02-19 10:41:32 -05:00
Mark Roszko 33419ee4bf Eeschema: remove unused headers, unused variables, redundant casts, and minor boolean tweaks. 2015-11-03 14:44:05 -05:00
Chris Pavlina 9466f19427 Eeschema: show connection indicator when placing no connect objects. 2015-06-24 11:39:44 -04:00
unknown 5dd0099119 Eeschema: Remove backtracking (overlapping) wires when creating new connections. 2015-06-23 17:01:34 +02:00
jean-pierre charras 94479d87c1 eeschema: fix minor Bug #1446779 (repeat parameters not initialized until a project config is read)
Now these parameters are stored in user config, not project config ( they are not really related to a given project, they are just a setup during an edition),
and the schematic editor and the component editor have now separate parameters, because they are separate editors with different constraints.
component editor: repeat pin enhancement (from and idea of Edward Johns)
2015-04-22 13:39:00 +02:00
jean-pierre charras 5a387ce5fa Eeschema: fix a crash on undo command, which sometimes happens after a wire /bus creation command was aborted.
(probably fix  Bug #1434988)
2015-04-10 13:22:44 +02:00
jean-pierre charras 00f8994ee1 Eeschema: Fix a (minor but annoying) bug detected by coverity which prevent Eeschema to draw components in "fast mode" (i;e. without pin texts) when they are moved, due to a draw parameter which was incorrectly used.
Move items rework: enhancements: for some items (sheets, components, bus entries) the mouse cursor is no more wrapped to the anchor. For large symbols, this is better: they are more easy to place.
There is also a change when starting a move item command: the full screen is redraw, and therefore there is no artifact due to the XOR draw mode.
Some other minor coverity fixes (uninitialized members).
2015-02-28 17:56:09 +01:00
jean-pierre charras c6f4f15926 Eeschema: Minor code reorganization:
* move not shared files (sch_item_struct.*, sch_base_frame.h) to eeschema;
* move wxEeschemaStruct.h to eeschema and rename it schframe.h to be consistent with the other corresponding file name schframe.cpp;
* remove few not needed  #include
2015-02-21 10:46:44 +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 4c6f7bc158 FIX: insert key must repeat text labels 2013-08-06 17:59:07 -05:00
Dick Hollenbeck c0832a0342 BUG FIX: eeschema as segfaulting on the 'Insert' key because the m_itemToRepeat
was simply a pointer to an object on the display list.  At times this object
would disappear from the display list, in the test case because of a concatonation
of two wires, and if you then tried to clone the non-existent object you'd get a 
crash.  This was not merely a bug, but a naive design choice. IMO.
Now the item to repeat is cloned, so will never also be on the display list.
2013-08-05 16:02:41 -05:00
Dick Hollenbeck efb34166ea *) retain grid origin in the BOARD and save it in legacy and kicad board files.
*) add hotkey for setting the grid origin as 'S', in board editor, module editor.
*) re-position the function interface for cursor movement from BASE_SCREEN into
   class EDA_DRAW_FRAME.  This is a prelude to getting rid of BASE_SCREEN or
   splitting it up.
2013-08-03 00:15:23 -05:00
Lorenzo Marcantonio 150cfebb59 Fixed some tab-induced disalignments
Charras beat me on fixing the include/sch_item_struct.h include issue from 4069
2013-04-06 14:28:02 +02:00
Lorenzo Marcantonio d12a45923b More work on EDA_COLOR_T and layers.
In particular the new mechanism for handling extended color palettes is in place,
included renaming the ini keys and saving the color name instead of its index; this means better forward compatibility with palette changes.

Since ini keys are changed, colors will be reset
2013-04-04 23:35:01 +02:00
Lorenzo Marcantonio c32f56ffaa Removed the long time dead SCH_POLYLINE class (schematic level polyline) 2013-03-31 22:40:22 +02:00
jean-pierre charras 143af26952 Eeschema: code cleanup, remove dead code and some global and useless variables 2012-09-28 19:47:41 +02:00
jean-pierre charras b660b033ad All: remove macros MAX, MIN, ABS from macros.h and replace these macros by std::max, std::min and std::abs (mainly found in old code). 2012-09-22 13:19:37 +02:00
Lorenzo Marcantonio e771112259 Enforced EDA_COLOR_T type and minor const-ification 2012-09-02 14:06:47 +02:00
jean-pierre charras 4f01bedf97 Eeschema: fix a bug that crashes eeschema (only when compiled in debug mode) when creating a new wire, and when any wire orientation is allowed. 2012-07-21 18:52:29 +02:00
jean-pierre charras 7f16520498 Eeschema: bug fix: when creating new connections, junctions were not always automatically added when needed.
Fix an other minor bug.
2012-07-05 13:37:48 +02:00
Moses McKnight 70c30bce74 Commit patches from Moses McKnight, to avoid duplicate junctions. 2012-06-20 11:52:29 +02:00
jean-pierre charras b5cac30abd Eeschema: fix a bug in bool SCH_LINE::MergeOverlap( SCH_LINE* aLine ): ends point of resulting segment incorrects.
remove unused icon files.
2012-03-19 08:48:29 +01:00
Wayne Stambaugh 058e17edf7 Minor code and Doxygen comment improvements.
* Remove double Clone() function calls from all classes derived from
  EDA_ITEM.
* Lots of Doxygen comment warning fixes.
2012-03-17 10:39:27 -04:00
jean-pierre charras 6dc85d1c96 Eeschema: fix bug Bug #956818 2012-03-16 20:08:57 +01:00
jean-pierre charras 909c2a6051 Dialog exit: better icon.
Pcbnew:
 * graphic_item_properties_base.fbp * dialog pad edit: make some strings more easier to translate.
 * global pad edition: fix a bug that change pad position instead of pad size (round pas only).
Eeschema:
 * fix a bug: new created wires were not alwaes shows until the screen was redrawn.
2012-03-09 19:58:58 +01:00
Wayne Stambaugh aaa1cc3e02 Eeschema object list and other minor improvements.
* Convert Eeschema from manually linked list to DLIST for storing
  SCH_ITEM objects.
* Add helper functions to SCH_SCREEN for appending list of SCH_ITEM
  objects.
* Fix bug in wire editing code for accurate undo/redo behavior.
* Add member to DLIST to append another DLIST.
* Other minor code cleaning.
2012-02-26 13:39:39 -05:00
Dick Hollenbeck b8a0ab4c52 switch to <> for includes from "" per conversation with Jean-Pierre and Wayne, adjust search paths 2012-01-22 22:33:36 -06:00
Wayne Stambaugh 8985a1807b Encapsulation and other minor improvements.
* EDA_DRAW_PANEL completely encapsulated.
* Moved OSX m_overlay member from EDA_DRAW_PANEL to EDA_DRAW_FRAME where
  it is used.
* Doxygen comment warning fixes.
2011-12-29 15:11:42 -05:00
Wayne Stambaugh c2e5fcaec8 More encapsulation improvements.
* EDA_DRAW_FRAME completely encapsulated.
* Encapsulate the the low hanging fruit in EDA_DRAW_PANEL.
2011-12-22 08:28:11 -05:00
Dick Hollenbeck b979d1e0b9 plugin work, accessors 2011-12-12 02:37:05 -06:00
Wayne Stambaugh 1047e60e35 Encapsulate SCH_POLYLINE, SCH_SHEET, and SCH_TEXT classes. 2011-12-08 10:45:01 -05:00
Wayne Stambaugh 9dce6fba09 Encapsulate SCH_JUNCTION, SCH_LINE, and SCH_NO_CONNECT classes. 2011-12-07 15:19:29 -05:00
jean-pierre charras bcbde5d813 All: fix a collision name between accessor function GetTimeStamp and GetTimeStamp in common.cpp.
In common.cpp GetTimeStamp is renamed GetNewTimeStamp (a better name).
Pcbnew: prepare work to calculate connections between pads that inteserct and therefore can be connected without any track (composite pads).
2011-12-07 16:49:32 +01:00
Wayne Stambaugh cc7e7fc5ca Memory allocation improvements and other minor fixes.
* Replace C malloc() and free() functions with C++ new and delete
  operators or the appropriate STL container.
* Add option to end mouse capture function to skip executing the end
  mouse capture callback.
* Lots of coding policy and Doxygen comment goodness.
2011-11-10 10:55:05 -05:00
Wayne Stambaugh 609abb2f0c Complete Eeschema unified move code.
* Schematic fields now use unified move code.
* Move the unified move code into file schedit.cpp
* Remove old schematic field move code.
2011-10-22 08:31:44 -04:00
Wayne Stambaugh 78377058c9 More Eeschema schematic item move code unification.
* Tweak move item to support moving schematic sheet pin objects.
* Change schematic sheet pin set position to constrain position within
  the parent sheet.
* Schematic sheet pin moving now handled by unified move code.
* Remove old schematic sheet pin move code.
* Add custom client data object for passing hot key information to
  command event handlers.
* Fix a bug that prevented changes to schematic sheet pin objects from
  being undone.
2011-10-21 09:59:15 -04:00
Wayne Stambaugh 6a4e8aa909 Eeschema schematic item move code unification.
* Add get and set position methods to all schematic items.
* Encapsulate schematic item position members.
* Add swap data method to schematic items that lacked one.
* Remove global swap data function used by undo and redo functions.
* Unify as many schematic move methods as possible.
* Remove unnecessary place schematic item methods.
* All schematic items are now moved in the same event handler.
* Fixed bug in hierarchical sheet get menu item string method.
* Make no connect and junction items movable, fixes lp:804048
2011-10-19 16:32:21 -04:00
Wayne Stambaugh d4fb921b43 Eeschema ERC improvements and other minor fixes.
* Move the hierarchical label connected test into the NETLIST_OBJECT class.
* ERC pin type strings can now be translated.
* Remove unused EDA_DRAW_PANEL attribute from all ERC test functions.
* Add get marker count method to SCH_SCREENS object.
* Redundant header removal.
* Lots of coding style policy fixes.
2011-10-07 10:41:30 -04:00
Wayne Stambaugh ebc7259a91 Rename WinEDA_App class to EDA_APP and remove redundant includes. 2011-09-06 10:09:40 -04:00
jean-pierre charras d76cd0cf2c Very minor fixes. 2011-07-03 20:51:07 +02:00