SiEPIC example Layout may be saved but not reopened

Hi, probably I am doing something wrong. I just opened a SiEPIC example:

  • SiEPIC/Example Layouts/Mach Zender Intefrerometer (Ebeam)
  • Save as (format =GDS2)>> it creates a file without extension
  • File Open ..

The saved file is not visible.

Comments

  • Have you tried forcing the file extension so the browse "filter"
    can "see" it?

    Some Linux file browse popups seem to leave out the "All
    Files (.*) option.

  • edited July 2023

    The problem is that saving doesn't add ".gds" extension to the file name.
    Now I have renamed "filename" to "filename.gds" and it is seen by Open command.
    No matter if I am using "All Files (.*)" or "GDS2 Files".

  • @wsteffe I know that is somewhat annoying, but the file dialogs behave differently on every system and I rely on Qt to to provide a common API. I do not want to work around issues there and rather accept it the way it is.

    Matthias

  • edited July 2023

    I have started this post after having tried a SiEPIC example. It was a long time since I used klayout.
    But now I see that the problem is very general and it happens with any kind of klayout project.

    I was using klayout 0.28.10 on ubuntu 22.04 but I do not think that this behaviour may be related with Qt GUI. The user is firstly asked a file name. After having entered it a second dialog is opened which allows the selection of the file tipe (default type being GDS2). At this point the code should add an extension that depends on the file type if it is not already included in file name. Qt or any other GUI can not make this choice for you.

    It doesn't make sense that the user has to enter the full file name (let say test.dxf) and then also to select the file type.

  • edited July 2023

    I agree.

    The problem can be fixed by evaluating QFileDialog::selectedNameFilter in all the places this class is used for selecting a file in save mode and adding the respective extension unless there is one already. QFileDialog could do that for me, but it doesn't. So basically every application using Qt needs to add this boilerplate code which I call a GUI toolkit issue.

    Matthias

Sign In or Register to comment.