daisy / pipeline-ui

A user interface for the DAISY Pipeline 2
MIT License
5 stars 2 forks source link

"New job" command causes additional windows #86

Closed bertfrees closed 1 year ago

bertfrees commented 1 year ago

The "New job (⌘N)" item in the "File" menu creates a new tab in the existing window as expected, but in addition also adds a new window that is almost identical to the existing window. The "New job" item in the tray menu does not have this behavior. I say almost because a job form that the user has started filling in but has not been submitted yet doesn't appear the same: the title is the same but the contents are reset to the initial job form with the script drop-down list. (The same behavior can be found when the window is hidden and opened again. See https://github.com/daisy/pipeline-ui/issues/83.)

When one of the windows is closed, all windows close.

Another funny observation: When all jobs in the window are closed, the window itself is then closed, and the tray icon is clicked, an empty window appears. So far this makes sense (except for https://github.com/daisy/pipeline-ui/issues/82). But when the "New job (⌘N)" item from the File menu is then chosen, a second window appears with two "Untitled job" tabs rather than one. The first window stays empty. If, when still only the first window is present, the "New job" item in the tray menu is selected one or more times, at first this apparently has no effect, but upon choosing the "New job (⌘N)" item from the File menu, one or more extra "Untitled job" tabs will be in the second window (so 3 or more in total).

NPavie commented 1 year ago

The "additional main window" issue is already fixed in https://github.com/daisy/pipeline-ui/commit/c5c78ae896c7069d38b2f3ef9aa43f3ad27f6918

(Problem was linked to the template code originally creating a new window instance every time the main window was requested)

For the window closing when all jobs are closed, it should be fixed by commit cc19b08780aa57ea82f60a37a450d0052f382cc8 : we now always keep an empty job opened in the list.

I'll let this issue opened to confirm this issue is fixed

marisademeglio commented 1 year ago

confirming that it is fixed on my machine