Open with double-click/drag to icon without losing last session

• Feb 19, 2021 - 14:49
Reported version
3.6
Type
Functional
Frequency
Once
Severity
S5 - Suggestion
Reproducibility
Always
Status
active
Regression
No
Workaround
No
Project

The Continue last session option under Preferences-General gives no reason to believe that there might be restrictions on this behavior.

1) However, if you open a file by double-clicking or dragging it to the MuseScore icon,…

2) …only that file will be opened if Musescore is not already running.

There has been a lengthy discussion (https://musescore.org/en/comment/1063758) about this, with proponents and opponents of this behavior of MuseScore.
The fact is that everyone works differently, some with many open documents in parallel, others serially with one score after another score.
But negative consequences for MuseScore's current behavior exist only for the "parallel worker":

You lose your whole "workspace" when accidentally opening a file (when MuseScore is not yet running).

The Open recent menu entry are not a solution to this problem, because this list includes documents that have been closed in the meantime. Much older, still open documents, on the other hand, are no longer in this list.

To make both sides happy and to prevent the loss of larger sessions, a "Restore last session" should be added to the File menu:
Screenshot 2021-02-19 143815mod.png
If you then accidentally open a file and lose your last session, you can have it restored afterwards and those who don't want to have it restored just have to resist clicking "Restore last session".


Comments

I believe (without checking the code) it should be simple to implement that option. We already save state when MuseScore crashes and for the "Continue last session" option in Preferences. So it is somewhere. We just need to enable manually triggering the reloading of previous session from the UI.

Few questions arise:

  1. If the user clicks "Restore last session", should the scores opened previously in the current session be closed, or should they remain open?
  2. Ditto for open palettes, input mode currently selected, virtual piano keyboard, etc.: should they revert to the state from the previous session, or should state changes made in the current session be kept?
  1. If MuseScore gets started due to a double-click onto a score, it should open that score only.
  2. If MuseScore gets started without double clicking a score and '"Restore last session" is set in Preferences, it should open the last session, not counting the ones listed in 1.
    Question is whether the score from 1. should get added to the session used in 2. or not
    Pro: it is easier to get rid of that score than adding it again
    Cons: it might have been a score that crashes MuseScore, having it in 'last session' whould take away the option of getting rid of it by double clicking another, only way out would be a factory reset
    Cons seems much stronger here.
    Hmm, actually maybe not, after a crash it asks whether to restore last session, so a simple "No" would get you out of that 'crash loop'.

  3. Double clicking a score while MuseScire is open should add it to the session. I believe that is happening already

If I double click a score, I want to open that and just that.
But I may (!) want to have that one open in the next session, together with those from the previous session

Yes, but I don't think MS must automatically decide which one. The more I think about it, the more I think the original proposed solution of just giving the option to manually restore the previous session is best. Any other (more automatic) solution will cause confusion.

In reply to by Louis Cloete

That was the reason for my suggestion, even if it seems a bit simplistic at first.
Personally, I would have liked to open the new file in addition to the last session. But that would make users like Jojo unhappy.
If you double-click a file (or drag it on MuseScre's icon), you can decide afterwards if you still want to have the last session with it or not – this would take both groups into account. Also, it seemed easy to implement, since the last session is already saved somewhere.