Commit Graph

28 Commits

Author SHA1 Message Date
Maciej Suminski 67ccf769c7 Symbol Editor: fix a crash when saving/reverting a library not present in sym-lib-table 2018-02-16 12:13:02 +01:00
jean-pierre charras a1af13f34d replace '%s' by \"%s\" in a few sentences to be consistent with all other messages 2018-02-13 10:22:05 +01:00
Maciej Suminski c9d9cec6ad LIB_MANAGER: exception handlers display error messages 2018-02-13 08:50:51 +01:00
Jeff Young 17ce87a7a5 Add library descriptions to component tree.
Fixes: lp:1747547
* https://bugs.launchpad.net/kicad/+bug/1747547
2018-02-07 08:45:33 +01:00
Maciej Suminski 351a8d72b8 Better test whether a symbol library is saved to its original file
File names can be reliable compared only after normalization. The
problem is the easiest to observe on Windows, where one can use slash or
backslash as path separator, so even though C:/file.txt and C:\file.txt
pointed to the same file - simple string comparison would indicate they
are different files.

Fixes: lp:1744724
* https://bugs.launchpad.net/kicad/+bug/1744724
2018-02-05 17:04:10 +01:00
jean-pierre charras 8022f1cc01 fix code after renamin files 2018-01-30 11:49:51 +01:00
Jeff Young 829c236437 Symbol library load performance enhancements.
1) Edit Symbol gets similar fix as Place Symbol
2) progress dialog updating reduced to once every 50ms
3) SearchText gets lazy normalization
4) TypeNames get lazy translation
5) default fieldNames get translated a single time per language change

These fixes reduce first-load-time of both Edit Symbol and Place Symbol
by about 2/3, and second-load-time of Edit Symbol to near-instantaneous.
2018-01-27 08:29:43 -05:00
Maciej Suminski 6b9a286a85 Fix crash when a renamed part is saved
The crash happened when during rename operation, when the original part
buffer has been marked as deleted, but its memory was not yet freed. The
renamed part was still using the original SCH_SCREEN object, which was
freed together with the original part buffer.
2018-01-22 17:46:30 +01:00
Jeff Young cba430deab Fix undo/redo and revert for libedit name changes and aliases
Three interrelated issues:
1) Implement an undo/redo type for renames so that we know to delete
the old lib entry and add a new lib entry
2) When doing so (for the undo/redo OR the original edit), we must
make a copy of the 'original' LIB_PART which is used for revert, and
hand it to the new lib entry
3) When comparing a modified component tree item with the current item
we must also check for aliases.

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

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

Fixes: lp:1744373
* https://bugs.launchpad.net/kicad/+bug/1744373
2018-01-20 11:20:22 +01:00
Maciej Suminski c09cf252c6 Symbol Library Editor: update node information on library sync 2018-01-10 12:04:34 +01:00
Maciej Suminski ee140ce6c8 Symbol Library Editor: do not leave the old part after renaming 2018-01-09 09:55:01 +01:00
Maciej Suminski 12c6b3337b LIB_MANAGER does not hold a SYMBOL_LIB_TABLE pointer
SYMBOL_LIB_TABLE might be destroyed without a forewarning, so
it is safer to request it every time it is needed.

Fixes: lp:1741820
* https://bugs.launchpad.net/kicad/+bug/1741820
2018-01-08 15:19:25 +01:00
Mark Roszko b98cc0b937 Some coverity fixes 2018-01-05 22:51:03 -07: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 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 891cf783fb Library Editor: Windows fixes 2017-11-21 23:18:55 +01:00
Maciej Suminski d3d2770093 Library Editor: fixed library manager synchronization to sym-lib-table 2017-11-21 23:18:55 +01:00
Maciej Suminski 8dabcc0125 Fixed signed vs unsigned integer comparisons 2017-11-21 23:18:55 +01:00
Maciej Suminski 658dd362cd Library Manager: clear the deleted part buffer when original file is saved 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 33242fd111 Library Manager: do not clear modified flag on 'save library as' action 2017-11-21 23:18:55 +01:00
Maciej Suminski 73ec145c33 Library Manager: wrapped risky calls with try..catch 2017-11-21 23:18:55 +01:00
Maciej Suminski f6f1dff9d0 Library Editor: enable part buffering for faster save, better 'save as' implementation
Previous 'save as' implementation simply copied the original file, so
the buffered changes were not save.
2017-11-21 23:18:55 +01:00
Maciej Suminski 2c20a10242 Removed friendship in LIB_PART and LIB_ALIAS classes.
It is not required and may a source of unnecessary temptation. There is
no place for friendship in rough C++ world.
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