I'm exercising GerberView's Load Gerber File more... The filenames in the Layers tab look consistent now. :-) When loading more Gerbers, additional files are inserted at the last selected Layers position, which makes sense to me.
But there is more odd behaviour: When a Layer (i.e. No. 9) is selected prior opening the Load Gerber File... dialog and then cancelled, the Layer 9 is cleared and shown as Graphic layer 9. Cancle should not do that IMO. Good thing btw.: identical filenames do not cause any mess. :-) Regards, Clemens On 2018-02-27 20:30, Jon Evans wrote: > Have you tried my patch from last night that re-does the sorting code? > > On Tue, Feb 27, 2018 at 2:29 PM, jp charras <jp.char...@wanadoo.fr > <mailto:jp.char...@wanadoo.fr>> wrote: > > Le 27/02/2018 à 20:09, jp charras a écrit : > > Le 27/02/2018 à 15:33, Jon Evans a écrit : > >> This is so strange. I just installed the nightly build on a Windows > machine just to see if this is > >> a Windows specific problem, and I still don't see it. > >> > >> What I did: > >> > >> 1) Start GerbView (in OpenGL mode) > >> 2) Load one file (using File->Open Gerber File...) > >> 3) See that file appears on Layer 1 > >> 4) Load another file (without clicking anything in the layer manager) > >> 5) Second file appears in Layer 2, and all colors and file names are > correct. > >> > >> Regarding your last point, I think by default the active layer is set > to one past the last one > >> loaded, so if you load files in sequence, they do not overwrite each > other, but if you click on a > >> layer in the layer manager (now there is a triangle indicator next to > it) and then load a file, it > >> will replace the selected layer. > >> > >> I would much appreciate if anyone who can reproduce this can do any > debugging to see what is going > >> on, since I can't reproduce it. > >> > >> I would expect that: > >> > >> 1) in GERBVIEW_FRAME::Read_GERBER_File() the first call to > GetActiveLayer() returns one higher than > >> the last layer you loaded > >> 2) then a few lines down, GetGbrImage( layers ) returns NULL and a new > image is created. > >> > >> > >> -Jon > > > > Hi Jon, > > > > This was very strange, however I found the culprit: > > This is in files.cpp the call (added by commit 0c9d11) to > > GetImagesList()->SortImagesByZOrder(); > > after loading a file. > > This call is incorrect (especially when files are not in X2 format) > ,and reorder the layers, but > > without changing the previous color of layers. > > > > SortImagesByZOrder() creates unexpected reorder of layers if files are > not using X2 format. > > (perhaps this is a flaw in this function) and cannot be called here. > > > > I committed the fix that removes this call. > > > > However, this fix creates an issue: load from a gerber job file does not > sort layers (easy to fix), > and sorting the layers by the context menu of the layer manager sorts the > layers, but colors are not > updated. > This is a serious regression. > Sort layers should update color items, if the layer fo these items has > changed. > You cannot expect X2 files are sorted during loading because the loading > order is unknown. > > > -- > Jean-Pierre CHARRAS > > _______________________________________________ > Mailing list: https://launchpad.net/~kicad-developers > <https://launchpad.net/~kicad-developers> > Post to : kicad-developers@lists.launchpad.net > <mailto:kicad-developers@lists.launchpad.net> > Unsubscribe : https://launchpad.net/~kicad-developers > <https://launchpad.net/~kicad-developers> > More help : https://help.launchpad.net/ListHelp > <https://help.launchpad.net/ListHelp> > > > > > _______________________________________________ > Mailing list: https://launchpad.net/~kicad-developers > Post to : kicad-developers@lists.launchpad.net > Unsubscribe : https://launchpad.net/~kicad-developers > More help : https://help.launchpad.net/ListHelp > _______________________________________________ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp