4ian / GDevelop

🎮 Open-source, cross-platform 2D/3D/multiplayer game engine designed for everyone.
https://gdevelop.io
Other
10.88k stars 853 forks source link

Doubled paste of multiple events #1199

Closed PascalLadalle closed 1 year ago

PascalLadalle commented 5 years ago

To Reproduce

Steps to reproduce the issue:

  1. Select two events in the events sheet, using the Shift key.
  2. Right-click and Copy.
  3. Right-click and Paste.
  4. You now have six events (instead of four).

Win10 GD5b79

4ian commented 5 years ago

The number of events by itself is fine: if you're selecting multiple events, you should get the events pasted at these multiple locations. (much like when you're editing in a text editor like Sublime Text or Visual Studio Code: if you're selecting multiple words, you have multiple carets).

But I tried and seems that every was pasted at the position of the first event selected, which is wrong :/

PascalLadalle commented 5 years ago

Oh I see... I didn't know about that. Indeed, the events get pasted as many times as I have lines selected before pasting. Not sure I'm gonna need that feature one day, but now I know how to avoid it, at least! 😅 And yes, I noticed something odd about the position of the pasted events, but it seemed irrelevant at the time.

Bouh commented 5 years ago

I start with it :

image

I select all from top to bottom, copy and paste, and i've this : image Number of events are false.

When we expect, pasted event are under because the last event selected is the first comment with 4. All pasted selection should be pastes under the last selection, no ? image

If we select from bottom to top the order of events move again : image

Bouh commented 5 years ago

We have also a crash sometimes when we copy and paste, and undo and redo, focus is missing and after that if we paste eventsheet freeze, sometimes he crash, and sometimes GD freeze and need to be killed manually. I've tryed to reproduce bug but seem a bit random on native, but on webapp it's always.


I was thinking about a log report for crashes, why don't we have a list of the user's last actions instead? The position of the mouse in the window, when mouse is pressed/released, the keyboard also. And everything would be listed in a file that you could read and emulate the actions in a development build.

I guess record the 50 last input would be enought, all recorded in a local file and sended only if the user wish when crash windows appear. Also we need to keep this file easyly findable in the finder/explorer of OS.

tristanbob commented 3 years ago

This problem is still around, and I expect it happens often, and to most users. Here is some more info on what triggers this bug:

How to Cause problem:

Work-around for the problem:

However, this work-around doesn't fix the ordering problem. It seems that events are created in the order they are selected.

PascalLadalle commented 3 years ago

@tristanbob As explained above, pasting creates a copy of the clipboard for each highlighted line. So, if you select and copy 4 events and want to paste one copy only, you need to deselect them before pasting. This seems to be a feature developers are used to. The bug report was kept open for the other issues (paste order and crash)

4ian commented 3 years ago

This multiple paste is a "feature" but I agree it seems more confusing than anything else. Ordering should definitely be somehow fixed.

Silver-Streak commented 1 year ago

I believe this entire behavior is changed with 5.1.157. I can no longer reproduce it. Does the newest version solved this for you, @PascalLadalle

Bouh commented 1 year ago

Fixed in https://github.com/4ian/GDevelop/releases/tag/v5.1.157