← Back to team overview

kicad-developers team mailing list archive

Re: Buglets in pl-editor


Le 20/08/2013 10:17, Lorenzo Marcantonio a écrit :
If called with a filename on the command line it loads the file but the
controls don't get filled with items... this should fix it:

=== modified file 'pagelayout_editor/pl_editor.cpp'
--- pagelayout_editor/pl_editor.cpp     2013-08-13 17:51:22 +0000
+++ pagelayout_editor/pl_editor.cpp     2013-08-20 08:12:13 +0000
@@ -113,7 +113,10 @@
                  wxMessageBox( msg );
+            {
                  descrLoaded = true;
+                frame->OnNewPageLayout();
+            }

Also, without passing a full pathname (i.e. only the filename) it gives a "Could not set current working directory (error 2: No such file or directory)"; that's because in

wxSetWorkingDirectory( fn.GetPath() );

the fn.GetPath() returns (correctly) the empty string and a chdir("") it's not valid (at least for POSIX systems). But it really needs to change the working dir?

(I didn't commit the fix myself since I know it's in heavy development... maybe these issues are already known)

You can commit these fixes.
Just remove wxSetWorkingDirectory( fn.GetPath() );

It comes from a copy and paste edition.
There is no need to change the CWD.
This is indeed not good.

The Pl_Editor (and its doc) is now almost finished.
It just needs to be used before adding new features or fixing oddities.

Jean-Pierre CHARRAS