[FIXED][EDITOR][BUG] Copied pieces are cleared when opening a level

Started by namida, March 17, 2018, 01:55:25 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

namida

Steps to reproduce:
1. Copy some pieces
2. Open another level (might also work with creating a new level)
3. Try to paste

Expected: Pieces are pasted.
Actual: Error message occurs.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

Nepster

Thanks for reporting this bug. I used this bug as an incentive to completely overhaul the copying procedure. Now every cut, copy or paste action uses the standard Windows clipboard. So from the next update on, not only will the copied pieces be preserved when creating a new level, they will even be preserved when restarting the editor itself. In particular you can have two instances of the editor open and copy stuff from one to the other.

namida

Along the same lines, this is a good reason to revive the request for "paste to original location instead of cursor location", because this may often be the desired behaviour when copying from one level to another. The duplicate feature does not currently help in this situation.

As an alternative measure than a change to established behaviour / adding an extra option: If the user selects Duplicate with no pieces selected, attempt to paste pieces from clipboard to their original location.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

Nepster

Could you please elaborate on why you need the copied positions in their old location? I expected that one always had to adapt their positions anyway, because the new level is different anyway.

Personally I like this "paste at cursor location" very much, so I don't want to go back. However I can implement the "duplicate uses clipboard, if no pieces are selected".

namida

An example that came up during converting the Lemmings Plus packs, in particular LPI and LPO, to the new formats was when I needed to add ceiling terrain, then needed to make the same change to a level's repeat version. I got around this ultimately by just copying/pasting in a text editor.

Similarly, this feature may be useful in general when dealing with modifications to levels that have/are repeats, or are otherwise similar (the "Code" levels from LPV was another such case).
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

Nepster

I see. I now implemented your suggestion, that the duplicate feature takes the clipboard pieces, if no piece is currently selected.