Jump to content

[implementation details] behaviour recently used list & double instances


Recommended Posts

I recently added a feature request here, which is somewhat related.

 

This is fairly long, sorry for that.

 

I noticed that saving a file under edit for the first time will add that file name to the recently used list immediately (the file still being open). I'm undetermined yet as to that this addition is the "best" or "most desired" behaviour. Another implementation behaviour would be to only add the file name to the recently used list when that file is no longer in the list of open files (being in the list of open files to be considered distinct from the file under edit; I'll elaborate on that).

 

I noticed that after saving the current file under edit (i.e. has focus) and then opening that same file by selecting it from the recently used list it _will_ be opened as a new instance. That means that there are two instances in the list of open files with the exact same file name. Not only that but these two instance with the same file name in the list of open files, one of which has focus (i.e. is under edit) and the other one does not refer to the same OS file on disk. Making edits in one instance will be effectuated only in that instance; not in the other one. The Save command saves the instance under edit with those (before unsaved) edits and will update the OS file instance in the file system on disk. The most obvious problem here is the undesired "competition" between the two files (withe the same name) in the open files list. "open" in the sense that they are open in the list displayed by paint.net as seen by the user. Both instances open in paint.net refer to the exact same (OS) file instance on disk. I think this is undesirable behaviour.

 

In addition you have, after the described save action (of edits) to disk:

  •  The instance that was just saved to disk, accurately displays its status by not displaying the * (i.e. not displaying the: edits-not-saved-to-disk; hereafter labelled as *-display).
  •  The other instance also displays its status by not displaying the *-display.

It can be argued that both are correct with respect to the (at one time) saved edits as seen from Paint.NET. They are, however, _not both_ correct with respect to their *-display as an accurately representation of the saved edits of the OS file instance on disk.

 

Q:  Can you confirm this behaviour and is it intended as such?


I've noticed that it doesn't seem possible to open a separate running instance of paint.net. (i.e. having a another separate instance of paint.net in memory).

 

My idea/suggestion would be something along these lines:

  1. Only add a filename to the recently used list when it is no longer in the list of open files in paint.net.
  2. When opening a file from outside paint.net from the OS explorer, check if this file is already open in paint.net. If so, only direct focus to that open file instance. If not, open the file from disk (and let it acquire focus).
  3. When opening a file from within paint.net (with the open command), check if this file is already open in paint.net. If so direct focus to that open file instance. If not, open the file from disk (and let it acquire focus).

 

My observation is that currently all actions mentioned under 1 thru 3 will result in a two instances situation in the open file list in paint.net _both_ referring to the same (OS) file in the file system and thus both affecting that disk file. This can occur in practice when having open a lot of files in paint.net. Having forgotten that a particular file X is already open and then opening it from the recently used list will create this situation.

 

The implementation of my suggestion of ad point 1 will require some additional manipulation of the recently used list. For instance: closing file X results in addition of its name to the list. After that, opening file X results in (a temporary) deletion from the list or (temporary) obscuring from being visible by the user (numbering has to be adjusted accordingly). This will also bring about nifty details about the exact meaning of "recently used":

  1. When "recently used" is interpreted as just having the Save command executed upon, the (saved) file name is added to the recently used list.
  2. When "recently used" is interpreted as just having the Save As... command executed upon, the (saved) file name is added to the recently used list.
  3. When "recently used" is interpreted as opened in paint.net (but _not_ having acquired any edits), the file name is added to the recently used list.

 

In situation 1 thru 3 the file name is currently added to the recently used list immediately at position # 1 when opened. If my suggestions are being considered then that behaviour at the opening of a file will probably change. No 3 might be eligible to change if my suggestions are being considered. My feature request, mentioned at the opening of this post, regarding the addition of a "Save a Copy As..." command might result in no (updated or new) addition to the recently used list.

 

Eric

 

 

 

Edited by EricRS
typo
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...