Commit Graph

10025 Commits

Author SHA1 Message Date
diogocondeco b54e77e466 Macos SetFocus() and SetSelection moved into OnInitDialog
pcbnew/dialog_find and pcbnew/dialog_pad_properties modified so that SetFocus and SetSelection is handled once the dialog is initiated.
2017-01-23 12:30:59 -05:00
Chris Pavlina fb104a111f gitignore: add .DS_Store 2017-01-23 09:08:22 -05:00
Maciej Suminski 1102eb0d0d Store menu titles in CONTEXT_MENU
Previously a title had to be provided when a submenu was added,
but this led to storing the same title in many places.
2017-01-23 14:52:11 +01:00
Maciej Suminski 6362e5cf0f Added create() method for SELECTION_MENU 2017-01-23 14:52:11 +01:00
jean-pierre charras 2b5769c0a8 Action plugins: simplify code, and fix an issue: the menubar was not correctly rebuilt after closing and reopening pcbnew from kicad.
It was also not correctly rebuilt after language change.
2017-01-23 13:27:49 +01:00
Jean-Samuel Reynaud 5ef3e5a15d Pcbnew: Add ACTION_PLUGINS class. It allows loading python scripts in footprint editor and run them from the Tools/External Plugins menu
This plugin mechanism is enabled only if option -DKICAD_SCRIPTING_ACTION_MENU=ON (it is off by default)
It imply -DKICAD_SCRIPTING=0N
This is currently for testing purposes only for developers, not yet for users.
2017-01-23 13:27:49 +01:00
jean-pierre charras df0d102b9c Remove unused icons. cleanup a svg file (no actual change in icon). 2017-01-23 13:27:03 +01:00
John Beard 89fe9d378c Add C++14-style std::make_unique 'polyfill' for C++11
std::make_unique is a very useful part of the new C++ smart pointers
ecosystem, as it allows one to dispense entirely with "new" and also
provides exception safety in some cases when creating temporary
variables.

It also allows more concise code by avoiding repetition of the type:

    std::make_unique<TYPE>( args );

vs

    std::unique_ptr<TYPE>( new TYPE( args ) );

This commit adds a "polyfill" to provide std::make_unique when C++11 is
enabled. The implementation is that submitted to the C++ committee, and
is essentially how it is done in GCC for C++14.

The intention is to allow KiCad to use this implementation when using
C++11 and when C++14 or greater is a requirement, to remove this code
and use the compiler implementation.
2017-01-23 11:41:00 +01:00
John Beard 7863e70181 Move PostCommandMenuEvent to EDA_BASE_FRAME
There is nothing PCB-frame-specific about this function,
it is equally applicable to an frame, for example
PCB_EDIT_FRAME and CVPCB_MAINFRAME, which have EDA_BASE_FRAME
as the nearest common ancestor, except KIWAY_PLAYER,
which is not really concerned with this kind of UI event method.
2017-01-23 11:41:00 +01:00
Maciej Suminski 59346a6ef1 Alternative way for setting icons for align/distribute actions. 2017-01-23 11:41:00 +01:00
Maciej Suminski f0a7c1715e Fixed warning 'cast pointer from integer of a different size' 2017-01-23 11:40:59 +01:00
Maciej Suminski fc7be1a497 Removed redundant CONTEXT_MENU::m_parent field. 2017-01-23 11:40:59 +01:00
Maciej Suminski 682da70a86 Fixed the issue of creating and event handling in context menus (GAL).
When creating a copy of CONTEXT_MENU, always a CONTEXT_MENU instance was
constructed, whereas an inherited type should be used. Solved with
CONTEXT_MENU::create() that has to be overridden in inheriting classes.

Event & update handlers are now virtual functions, instead of setting
the handlers with Set{Event,Update}Handler().
2017-01-23 11:40:59 +01:00
jean-pierre charras d7ed3ede72 Ensure paths and filenames are always stored with '/' as separator in fp_lib_table, like in other kicad files.
Ensure also paths and filenames read from a fp_lib_table always use '/' as separator (works fine on Windows)
Fixes: lp:1658534
https://bugs.launchpad.net/kicad/+bug/1658534
2017-01-23 11:32:58 +01:00
John Beard 6a1b068dd2 Allow editing locked modules in modedit
Since you have to explicitly enter the module editor with the menu or
hotkey, allowing editing of module sub-parts once in should not cause
any unexpected changes.

Fixes: lp:1591625
* https://bugs.launchpad.net/kicad/+bug/1591625
2017-01-22 20:31:59 -05:00
John Beard 5cc2abaa2b Tidy consts for class D_PAD
Some accessors should be const:

* IsFlipped
* GetRoundRectRadiusRatio

Returning a objects by value as const in these cases is not helpful, as
all it does is prevent the caller moving from the return value, it just
forces a copy.

Some of thse functions come from base class overrides, those haven't
been changed.

* ShapePos
* GetPadName
* GetPackedPadName
2017-01-22 10:42:45 -05:00
Baranovskiy Konstantin 4be2c79b87 Make doc extension (pdf) case insensitive. 2017-01-22 10:40:37 -05:00
Mario Luzeiro 33449216b5 3D-Viewer: Improvements on reflection and refraction
- crete an option for absorvance (works better to make the epoxy
different for regular transparent materials).
- visual fix an issue related with the epoxy render (square bands on the
render).
- fix a reflection issue (it was not take in account the reflection
material color).
2017-01-21 09:21:44 -05:00
Robbert Lagerweij 550a1ea4d6 eeschema: set title of plotted pdf to sheet title
Fixes: lp:1656956
https://bugs.launchpad.net/kicad/+bug/1656956
2017-01-20 17:11:12 -05:00
jean-pierre charras 2de913797a Fix a UI policy issue. Very minor cosmetic change: give same look to Zoom and Grid selection in 2 menus. 2017-01-20 11:35:24 +01:00
jean-pierre charras 92632a7a13 pcb_calculator/transline/microstrip.cpp: remove useless local var, shadowing a member var. 2017-01-20 11:33:01 +01:00
jean-pierre charras adb679dc46 ROUTER_TOOL_MENU: add zoom selection to this menu. 2017-01-20 08:51:12 +01:00
jean-pierre charras d51d53c6b9 CONTEXT_TRACK_WIDTH_MENU EventHandler: better filtering of received events ID.
This is mandatory because currently, on Windows, this handler is also called when clicking on an other menu with submenus like the grid menu.
2017-01-20 08:29:24 +01:00
jean-pierre charras e710b8b370 Fix incorrect parameter type when appending zoom and grid menuitems 2017-01-19 20:26:57 +01:00
Tomasz Włostowski ba9576b014 router: snap to clearance boundaries in Highlight Collisions mode
Fixes: lp:1655819
* https://bugs.launchpad.net/kicad/+bug/1655819
2017-01-19 17:47:15 +01:00
Mario Luzeiro 2eb840b2ed 3D-Viewer: Fix precision issues (experienced on isometric mode) in frustum tests 2017-01-18 18:09:27 -05:00
Maciej Suminski e5fbd0c442 Fixed crash upon finished zone drawing in GAL.
In principle, this patch reverts 2eefa117. The difference is removal of
one unused method (SELECTION::clear) and fixing hidden overloaded
virtual methods warnings.

Fixes: lp:1657569
* https://bugs.launchpad.net/kicad/+bug/1657569
2017-01-18 22:06:23 +01:00
Simon Richter fbace8e513 Fixed two hidden overloaded function warnings.
Correct way of writing commit c4db8bf4.
2017-01-18 17:24:50 +01:00
Maciej Suminski c4db8bf45f Revert "Removed Pin{Shape,Type}ComboBox::SetSelection()."
Enforcing the appropriate type is a good thing, though it results in
build warnings. For the moment we stay with the latter.

This reverts commit 6dd47119fe.
2017-01-18 16:58:20 +01:00
John Beard 5a2be26934 Tool Framework documentation 2017-01-18 16:30:33 +01:00
Tomasz Włostowski bb463ad434 pns: fix assertion fail when placing diff pairs 2017-01-18 15:55:46 +01:00
Maciej Suminski 838c6097d9 Removed a redundant assert in OPENGL_COMPOSITOR. 2017-01-18 14:30:08 +01:00
Maciej Suminski 196c5aca83 Fixed 'unreferenced local variable' warning in OPENGL_GAL. 2017-01-18 14:23:06 +01:00
Maciej Suminski 6dd47119fe Removed Pin{Shape,Type}ComboBox::SetSelection().
These methods were hiding an overloaded method, which was called anyway.
2017-01-18 14:20:39 +01:00
Maciej Suminski 75fb04d650 TOOL_ACTIONs are handled with transitions, no handlers needed in the event loops
There used to be a number of TOOL_ACTIONs that had entries both in
SetTransitions() and the event loop, which seemed redundant and
troublesome.
Now it is not necessary anymore, transitions setup is enough to execute
associated actions.
2017-01-18 14:20:39 +01:00
Maciej Suminski 2eefa11732 SELECTION has-a VIEW_GROUP instead of being-a VIEW_GROUP
Fixed numerous warnings caused by hidden overloaded methods
provided in both classes (Add(), Remove(), etc.)
2017-01-18 13:22:41 +01:00
Maciej Suminski 3c61b16e7b Code formatting 2017-01-18 13:22:40 +01:00
Maciej Suminski c758f434c0 Removed unused fields in VIEW & ANTIALIASING_SMAA classes 2017-01-18 13:22:18 +01:00
Maciej Suminski ee862e1db4 Fixed a hidden overloaded virtual function warning in PNS 2017-01-18 13:22:18 +01:00
Maciej Suminski ee2b1ac321 Shortened code using VIEW & PAINTER classes in MODULE_TOOLS methods 2017-01-18 13:22:18 +01:00
Baranovskiy Konstantin 3dc2050498 Improved MousewheelPAN mode. 2017-01-17 16:34:11 -05:00
jean-pierre charras f079b7f98b gendrill_Excellon_writer.*: make 3 helper methods private. Coding style fixes. 2017-01-17 20:37:14 +01:00
Wayne Stambaugh 56fbfeeb4a Do not use default board solder mask clearance in footprint editor.
The footprint editor was displaying the default solder mask clearance
defined by the temporary BOARD object created a start up.  Change the
temporary BOARD default solder mask to 0 so the pad or footprint solder
mask clearance setting is displayed when editing the footprint.

fixes lp:1653980

https://bugs.launchpad.net/kicad/+bug/1653980
2017-01-17 09:05:57 -05:00
jean-pierre charras fef40c96e2 Workaround for this issue: Pcbnew crashes on exit in OpenGL display mode when a footprint on the board was edited in the fp editor
Fixes: lp:1655858
https://bugs.launchpad.net/kicad/+bug/1655858
2017-01-17 13:17:14 +01:00
John Beard aea9163aa5 .gitignore: add demo files' autosaves and backups 2017-01-16 17:22:21 +01:00
Maciej Suminski 004ca3c6f9 Fixed a memory leak in VIEW_ITEM (proper way of doing 9bc2bb2)
The problem with simple deleting VIEW_ITEM_DATA upon VIEW_ITEM removal was
caused by the default copy constructors that copied pointers.
Once a copy of an item was destroyed, the VIEW_ITEM_DATA has been
destroyed, effectively invalidating m_viewPrivData for the other item.
2017-01-16 14:57:50 +01:00
Chris Pavlina 8ac4790370 Remove icons from canvas selection menu in modedit
No OS renders the combination of icon AND radio button properly.
2017-01-15 07:12:02 -05:00
Chris Pavlina d442009e84 Use radio buttons in canvas selection menu items 2017-01-15 07:05:24 -05:00
jean-pierre charras 053dac45c1 complex_hierarchy: minor changes in texts (add info in page frame) 2017-01-15 08:32:43 +01:00
jean-pierre charras 9c49dea741 Update complex hierarchy demo to use current kicad libraries. 2017-01-14 18:27:04 +01:00