Commit Graph

186 Commits

Author SHA1 Message Date
Chris Pavlina 7e6a6540c8 Implement primitive icon scaling for high DPI
This is meant as a stopgap for 5.0, with plans to add proper scaled
icons in the 6.0 cycle. A function KiScaledBitmap() is added, which
works like KiBitmap() except it scales the bitmap according to the
calling window's font size. Controls have been added to all the main
applications to let the user select scaling manually (these were omitted
from smaller apps that didn't already have a place to put them).

In addition, in eeschema only, the pixel height of the system font is
shown in the options dialog for diagnostics. This is only for collecting
feedback before 5.0 release from users with different displays and will
be removed.
2018-01-10 21:26:06 -07:00
Maciej Suminski 8c42abc10c Symbol Library Editor: fix crash after renaming a symbol
Crash was caused by removal of the selected item from the
wxDataViewModel, which was later accessed in
COMPONENT_TREE::GetSelectedLibId(). To avoid the problem, the selection
is validated before regenerating the tree widget.

Fixes: lp:1740952
* https://bugs.launchpad.net/kicad/+bug/1740952
2018-01-10 08:52:17 +01:00
Wayne Stambaugh 00fb70088f Eeschema: fix progress dialog title capitalization. 2018-01-09 10:58:01 -05:00
Maciej Suminski ee140ce6c8 Symbol Library Editor: do not leave the old part after renaming 2018-01-09 09:55:01 +01:00
jean-pierre charras 019eed0d28 Symbol editor: rework on multi-unit symbols: pin edition synchronization is now only between units (Work in progress)
The synchronization between body styles of the same units is removed.
This is easier to understand by users.
2018-01-09 08:54:48 +01:00
jean-pierre charras 1d2752ee47 Symbol editor: rework on multi-unit symbols are pin edition synchronization between units (work in progress)
User Interface: better tooltips and better messages.
Code: better comments, and better member name.
Fix a few minor issues.
2018-01-09 08:54:47 +01:00
Seth Hillbrand 6073bf3ea7 Library Editor: Moving current item to the base screen
Store the currently-edited item in the base screen class
instead of the libedit_frame.  This allows us to access it
for double-click disambiguation and harmonizes the library
editor with the schematic editor code that already does this.

Fixes: lp:1738694
* https://bugs.launchpad.net/kicad/+bug/1738694
2017-12-29 15:51:51 -05:00
Maciej Suminski d4c8e1b5e9 Fixed ignored hot keys for save part/library commands in Symbol Editor
Previously wxUpdateUIEvent::SetText() stripped hotkey from menu entries.

Fixes: lp:1737819
* https://bugs.launchpad.net/kicad/+bug/1737819
2017-12-19 12:21:07 +01:00
jean-pierre charras 9d4bfbded8 libedit, UI very minor change:
Enable "save curr lib" tool of main toolbar when modified even if this lib is empty.
It happens when all items are erased, and it is consistent with the close libedit dialog
that ask for saving all modified libraries
2017-12-18 09:50:28 +01:00
Simon Richter a9ccf1161b Fix quotes in UI messages
This replaces all single and angle bracket quotes in UI messages with
double quotes, for consistency.

Sorry to all translators.
2017-12-15 07:33:07 -05:00
Maciej Suminski 45bf919923 Restoring the previous performance of COMPONENT_TREE widget
It turns out the fastest way to update wxDataViewCtrl is to nuke the
model and rebuild it from scratch rather than via
ItemAdded()/ItemDeleted() update notifications.

Fixes: lp:1734773
* https://bugs.launchpad.net/kicad/+bug/1734773
2017-12-04 10:42:37 +01:00
Maciej Suminski 6b74f8ef48 Library Editor: fixed an assert after removing libraries with Symbol Library Table dialog 2017-11-22 14:15:51 +01:00
Maciej Suminski d76f7d7bd2 Library Editor: fixed an assert after canceling add library action 2017-11-22 14:03:01 +01:00
Maciej Suminski aaabf8ab78 Library Editor: fixed a crash when creating a new library with existing file 2017-11-22 13:40:14 +01:00
Maciej Suminski 8b0041bf9a Library Editor: progress dialog when loading libraries 2017-11-22 13:40:14 +01:00
Maciej Suminski ed059383c7 Library Editor: removed library actions from the part context menu 2017-11-21 23:18:55 +01:00
Maciej Suminski 0b7ab40288 Updated cut/copy/paste toolbar icons
Removed cut & copy toolbar icons in the schematic editor, as they
were inaccessible. One cannot have an item selected and move the
mouse outside the canvas area due to autopanning.

Added paste icon to the library editor.
2017-11-21 23:18:55 +01:00
Maciej Suminski 256276cf1c Library Editor: copy/cut/paste for graphical items 2017-11-21 23:18:55 +01:00
Maciej Suminski 4fe06656a6 Minor refactor in LIB_EDIT_FRAME::Process_Special_Functions()
Shortened 'screen->m_BlockLocate' to 'block'.
2017-11-21 23:18:55 +01:00
Maciej Suminski 86f71a9eb4 Library Editor: notify is library is read-only 2017-11-21 23:18:55 +01:00
Maciej Suminski d2d3680774 Library Editor: more descriptive symbol table picker dialog 2017-11-21 23:18:55 +01:00
Maciej Suminski ba4515885b Library Editor: select part in the widget component on create/paste/duplicate component 2017-11-21 23:18:55 +01:00
Maciej Suminski 7d45d8b23c Library Editor: made the component tree pane resizable 2017-11-21 23:18:55 +01:00
Maciej Suminski 076633bb5e Library Editor: disable 'save component' for read-only libraries 2017-11-21 23:18:55 +01:00
Tomasz Włostowski 7fc1e1d53c Library Editor: component cut/copy/paste/duplicate 2017-11-21 23:18:55 +01:00
Maciej Suminski 8f1897adfd minor refactor 2017-11-21 23:18:55 +01:00
Maciej Suminski fb4875c681 Library Editor: refactored code for creating backup files 2017-11-21 23:18:55 +01:00
Maciej Suminski bb83b73f76 Library Editor: mark the current library/part with a different color 2017-11-21 23:18:55 +01:00
Maciej Suminski dfcd42f5ef Library Editor: save libraries added in the editor to sym-lib-tables 2017-11-21 23:18:55 +01:00
Maciej Suminski 26304c54ed Library Editor: fixed update UI event handlers 2017-11-21 23:18:55 +01:00
Maciej Suminski 24ddbbaf25 Library Editor: display a list of libraries to save on close 2017-11-21 23:18:55 +01:00
Maciej Suminski 5c61b61c27 Improved synchronization algorithm for LIB_MANAGER<->COMPONENT_TREE 2017-11-21 23:18:55 +01:00
Maciej Suminski a789b735e9 Library Manager: logic 2017-11-21 23:18:55 +01:00
Maciej Suminski 769c6a8d51 Library Manager: user interface 2017-11-21 23:18:55 +01:00
Wayne Stambaugh 8fd89c881d Final symbol library table changes before merge.
Remove all symbol libraries from the project file after remapping to
prevent symbols that should be loaded from the cache being loaded from
a library further up the search order.  Save the project file to clear
all of the libraries so they never get reloaded again.

Remove the symbol library management dialog and menu entries.

Rename the symbol library table dialog menu entry.

Remove all symbol libraries from default project file to prevent clashes
with the cache library.

Fix illegal symbol naming in Eagle plugin.
2017-11-09 18:50:21 -05:00
Wayne Stambaugh 36f6d4a1f4 Convert symbol library editor over to use symbol library table.
Simplify some of the library editing code.  There have been a few minor
changes in the behavior of the editor.  If the current symbol is deleted
from the library, the next symbol in the library is not loaded.  The
deleted symbol is cleared and the current symbol is empty.

Change component to symbol to align with the preferred terminology
discussed on the developer's mailing list.

Add separate update UI event for save library as to enable the menu entry
whenever a library is selected.

Change the select symbol list dialog to a single column using the LIB_ID
format LIB_NICKNAME:LIB_ITEM_NAME so that the selection can be parsed by
LIB_ID.

Add method to expand URI to LIB_TABLE_BASE.

Override wxApp::OnExceptionInMainLoop() in debug builds to make debugging
easier when an unhandled exception occurs in a wxUpdateUIEvent handler.

Change SCH_SCREENS::HasNoFullyDefinedLibIds() to return false when the
schematic has no symbols to prevent the remapping dialog from being run.

Use SCH_COMPONENT part reference when creating netlist rather than looking
up the library symbol.
2017-11-09 18:50:20 -05:00
Bernhard Stegmaier 0be357ec3e LIB_ITEMS_CONTAINER reimplemented using C-style array of boost::ptr_vector
Fixes: lp:1714974
* https://bugs.launchpad.net/kicad/+bug/1714974
2017-09-20 08:39:14 +02:00
Seth Hillbrand 1fe91e6252 Eeschema: handle disambiguation cancel in library editor right-click
Fixes: lp:1714608
* https://bugs.launchpad.net/kicad/+bug/1714608
2017-09-02 14:52:18 -04:00
Wayne Stambaugh 0e41632105 Fix build error.
Bind() and Unbind() require class specification when passing a pointer to a
class member.
2017-08-12 12:10:47 -04:00
Wayne Stambaugh f781691049 Eeschema: add symbol library table editor dialog.
Create a new dialog to edit global and project specific symbol library
tables.

Add menu entries for new symbol library table editor in schematic editor
and symbol library editor main frame menus.

Add command event handler for symbol library table editor dialog to
SCH_BASE_FRAME so it is accessible from derived frames.

Fix bug in default environment variables initialization.  A test for
existing user defined environment variables was preventing any new
default environment variables added to the list from being initialized.
2017-08-12 08:10:34 -04:00
Maciej Suminski e18475f220 Renamed remaining constants to match the action (see ab44e7cc) 2017-07-04 10:08:33 +02:00
jean-pierre charras ad48cd435d Replace SetToolID( ID_NO_TOOL_SELECTED, ...) by SetNoToolSelected() in code 2017-06-12 16:17:48 +02:00
jean-pierre charras 526b5e2cd3 Fix broken behavior of the "Zoom to selection" tool in Gerbview and Eeschema. 2017-06-10 09:07:17 +02:00
Fabrizio Tappero ac9a64a173 general UI fix. Fixed a lot of icons and a lot of menu.
Also a few no longer used .cpp icon files are removed.
2017-06-02 11:51:11 +02:00
jean-pierre charras 1f3fe6fefb Fix Eeschema: Part library editor "save current library as" crash if no current library selected.
Fixes: lp:1678698
https://bugs.launchpad.net/kicad/+bug/1678698
2017-04-03 07:58:34 +02:00
Chris Pavlina a72d32d3fd Test for dangling pins after symbol is edited
Fixes: lp:1562897
* https://bugs.launchpad.net/kicad/+bug/1562897
2017-03-10 12:01:12 -05:00
Wayne Stambaugh 9636086f52 Fix build bug for const incorrectness. 2017-03-10 10:09:55 -05:00
Wayne Stambaugh cc64c6af1d Fix broken symbol link in schematic after editing.
The save current symbol command had a different code path then save current
library so the schematic symbol was not being refresh after is was modified
in symbol editor.

Split out the save current symbol command from Process_Special_Functions()
to help reduce function growth hormone imbalance syndrome.

Some coding policy fixes and wxT() macro removal.

Fixes lp:1671456

https://bugs.launchpad.net/kicad/+bug/1671456
2017-03-10 08:39:29 -05:00
Maciej Suminski 0dc88bb4cf Changed COLOR4D defines to static consts 2017-02-22 17:35:00 +01:00
Jon Evans a52250a91e Change from EDA_COLOR_T to COLOR4D globally; arbitrary color support
eeschema now supports arbitrary colors for all object types, and
pcbnew does in GAL canvas.  When switching from GAL to legacy canvas,
pcbnew will convert colors to the nearest legacy color.
2017-02-22 17:35:00 +01:00