Undo removes wrong condition

Bugs will be moved here once resolved.

Post » Thu Jul 21, 2016 9:56 pm

Problem Description
Adding any trigger, adding a condition referencing an object, and then changing that object will cause the undo states to get messed up.

Attach a Capx
https://1drv.ms/u/s!AhHSZHEulqh_gWaBvD2nZ1GY7tD7

Description of Capx
has comment with instructions to reproduce the undo error.

Steps to Reproduce Bug
  • create 'on any animation finished' trigger (possibly any trigger will do? edit: I just checked with other triggers and same thing happens!)
  • add any condition that references an object
  • right click and change object sprite to sprite2
  • now undo all states- it will end up remove the first trigger and leaving the condition (it removes the wrong condition)

Observed Result
the wrong condition is undone.

Expected Result
undo should be in correct order.

Affected Browsers
  • Chrome: (YES/NO)
  • FireFox: (YES/NO)
  • Internet Explorer: (YES/NO)

Operating System and Service Pack
vista sp2

Construct 2 Version ID
r227
B
48
S
23
G
66
Posts: 1,144
Reputation: 39,059

Post » Thu Jul 21, 2016 9:57 pm

Also, should note that I have experienced this exact same issue with the actions- but haven't figured how to reproduce those cases. It might be related to this case though.

edit: I figured out the issue with the Actions too! I filed another bug report for that one.

edit2: seems as if the trigger step is not needed.. So this bug is exact same issue as the action bug (changing object causes undo state to mess up)
B
48
S
23
G
66
Posts: 1,144
Reputation: 39,059

Post » Mon Aug 01, 2016 3:03 pm

I can't reproduce, following these steps:

- I open your .capx file
- it looks like the event you describe is already created
- you say "right click and change object sprite to sprite2" so I try right-clicking the first trigger ("on any animation finished"), choose "replace object", replace Sprite with Sprite2
- you say "now undo all states" - so I press undo

Result: it correctly undoes the "replace object", and nothing has been removed.

Did I misunderstand your instructions?
Scirra Founder
B
403
S
238
G
89
Posts: 24,654
Reputation: 196,155

Post » Mon Aug 01, 2016 5:12 pm

@Ashley , Yes, you misunderstood. You didn't follow all the steps.
You have to start with no event. So you need to first CREATE the conditions, so that when you undo later, it will undo he creations of those conditions. Then do the rest of the steps.. create a condition that references one sprite, then right click and change it to another sprite.. then undo so that it has to remove the conditions.. it will remove the conditions in the wrong order..
B
48
S
23
G
66
Posts: 1,144
Reputation: 39,059

Post » Tue Aug 02, 2016 11:11 am

I still can't reproduce this. It's a pretty confusing report for me. Your .capx includes the event you describe, but I'm not meant to use that? OK, so I just create an identical event beneath it? Then when you say "right click and change object...", what exactly am I supposed to right click? I tried following the steps again, and replaced the object for the second condition, and it still worked fine.

You have to be absolutely precise, thorough and unambiguous with your steps to reproduce, otherwise it's a struggle to follow along with what you're doing.
Scirra Founder
B
403
S
238
G
89
Posts: 24,654
Reputation: 196,155

Post » Tue Aug 02, 2016 6:28 pm

@Ashley, here is a youtube video showing the steps: https://youtu.be/LmDXZrNIZBc
As you see in the video, the On start of layout gets incorrectly undone before the other condition.
I also show the same issue with undoing actions.

I create the On start of layout condition.
Then I create another condition that uses an object.
Then I right click that condition and choose replace object, replacing with another object.
Then I undo once to undo the replacement, but then I undo again, and the On start of layout condition is removed instead of the second condition (because replacing the object somehow has now messed up the undo/redo stack).
B
48
S
23
G
66
Posts: 1,144
Reputation: 39,059

Post » Wed Aug 31, 2016 3:53 pm

Scirra Founder
B
403
S
238
G
89
Posts: 24,654
Reputation: 196,155


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests