← Back to team overview

kicad-developers team mailing list archive

Re: Failure-to-save bug in eeschema library editor ?

 

On 11/10/2011 1:15 PM, Øyvind Aabling wrote:
There seems to be a problem with the eeschema
library editor in recent BZR versions of kicad:
Changes to edited parts aren't saved to disk, and the only
way to exit the library editor is to discard all changes :-(

I've now checked the BZR versions that I've been running lately,
and it works in BZR 3001 and 3153, and is broken in 3212,
3221 and 3226 (so it broke somewhere between 3153 and 3212).

I've updated my Debian recently, so I pulled BZR 3001
again (had deleted it :-) and the latest (BZR 3226), and
compiled both, to see if the problem was (in some obscure way)
related to library files on my system that have been upgraded
since compiling the various versions of kicad (No, it isn't ...).

To recreate:

Start eeschema,

start the Library Editor,

"Select working library",
(any library that you have write access to, e.g. in your project dir)

"Load component to edit from the current lib",
(any component will do)

"Create a new component from the current one",
(or change the component in some way, or create a new
component, or ... - anything that's considered a change)

"Update current component in current library",
(this step can be skipped - the next step will
then ask for inclusion of the changes, which
doesn't make any difference on the behaviour)

"Save current library to disk"
Include last component changes? Yes
Modify library file "<name>.lib"? Yes

Now, the <name>.lib and/or <name>.dcm file(s) should have been
updated, but no, they're not, and the "Save current library to disk"
icon (far left) doesn't inactivate (gray out) either.

I do not have this problem on 64 bit Debian Testing using KiCad version BZR 3226 and wxWidgets 2.8.12 even with all of the fancy new Gnome 3 stuff. The library file changes are saved properly and the save current library tool bar icon and file menu entry are disabled as expected.


Let's see if we can save the changed/new part to a new library:

"Save current component to new library"

Yes :-), the file <part>.lib is created (in the current dir).
The file <part>.dcm doesn't get created, but it didn't either
in the earlier versions of kicad (maybe it should ?).

You should have gotten a warning dialog that your new library needs to be added to the project at this point.

The only way to exit the library editor is to discard all changes:

"Quit"
Library "<name>" was modified!
Discard changes?

No -> Can't quit library editor :-(
Yes -> The changes made are lost :-(

This is the correct behavior. You didn't save the changes you made to the current component to the current library. You only save them to a new library which is what you requested. The modified component in the currently library still exists. The new library is not loaded when you saved the modified component to a new library that's why the save current library tool bar button is still enabled. You must open the library dialog in the preferences menu and add your new library to the project in order to use it. I don't ever remember the library editor ever behaving differently than this.

The running eeschema _does_ seem to remember the changes, though,
so I didn't notice the failure to save the changes to disk at first
(thought it was just a minor problem with the "changes made" flag) ...

... at least until I deleted the *-cache.lib files, and then
suddenly parts disappeared or reverted back to an older version :-(
Fortunately, it was only a few simple changes ...


Btw., "bzr -r revno:3001 update" _does_ downgrade the source to
BZR 3001, and the resulting kicad _is_ the older version (old style
icons and layout, and w/o the lib editor bug), but it presents
itself in the kicad titlebar as the newest BZR release ?
This was a bit confusing at first ...

Run "make rebuild_cache" before running "make" to update the version file every time you update your source branch. Otherwise the version file will be out of synch with the repo version.

Wayne


Øyvind.

**************************************************************************
* Øyvind Aabling E-mail : Oyvind.Aabling@xxxxxxxx /~\ The ASCII *
* UNI-C Lyngby Phone : +45 35 87 88 89 \ / Ribbon *
* DTU Building 304 Phone : +45 35 87 89 51 (direct) X Campaign *
* DK-2800 Lyngby Fax : +45 35 87 89 90 / \ Against *
* Denmark Web : http://www.uni-c.dk/ HTML Email! *
**************************************************************************
Quidquid latine dictum sit, altum viditur.


_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Follow ups

References