Author Topic: [FIXED][EDITOR][BUG] Copied pieces are cleared when opening a level  (Read 1489 times)

0 Members and 1 Guest are viewing this topic.

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
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 Lemmings 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)

Offline Nepster

  • Posts: 1829
    • View Profile
Re: [EDITOR][BUG] Copied pieces are cleared when opening a level
« Reply #1 on: March 17, 2018, 03:17:04 PM »
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.

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: [EDITOR][BUG] Copied pieces are cleared when opening a level
« Reply #2 on: March 17, 2018, 10:05:47 PM »
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 Lemmings 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)

Offline Nepster

  • Posts: 1829
    • View Profile
Re: [EDITOR][BUG] Copied pieces are cleared when opening a level
« Reply #3 on: March 18, 2018, 08:49:27 AM »
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".

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: [EDITOR][BUG] Copied pieces are cleared when opening a level
« Reply #4 on: March 18, 2018, 09:28:34 AM »
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 Lemmings 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)

Offline Nepster

  • Posts: 1829
    • View Profile
Re: [EDITOR][BUG] Copied pieces are cleared when opening a level
« Reply #5 on: March 18, 2018, 12:18:48 PM »
I see. I now implemented your suggestion, that the duplicate feature takes the clipboard pieces, if no piece is currently selected.