Go Back   Cockos Incorporated Forums > Projects > Deprecated REAPER issue tracker > Closed Issue

API: undo issues Issue Tools
issueid=4934 09-19-2013 01:48 PM
Mortal
API: undo issues
API: undo issues since v4.5

Something went wrong around v4.5: undo points created via the API seem broken.
It's a bit like states are "remembered" but no no undo point is actually created (so you need to make a sel change or something to get it, etc.)

Repro example (WinXP, REAPER v4.51, SWS v2.4.0.1):
- save a project with a sel media item
- close reaper, reopen it, load the above project (-> "initial state" undo point)
- run the action "S&M cut take"
=> v4.51: no undo point => KO
=> v4.402 (with same SWS v2.4.0.1): an undo point "cut take" is created OK
- sel another media item, undo "media item sel"
=> v4.51: both the media item sel + "cut take" are undone => KO

The undo code is:
Code:
Undo_OnStateChangeEx2(NULL, SWS_CMD_SHORTNAME(_ct), UNDO_STATE_ALL, -1);
^^ "ceinture et bretelles" as we say in French!

___

IX is also reporting a very similar issue in ReaScript, discussion here: http://forum.cockos.com/showthread.p...66#post1242566
Issue Details
Issue Type Closed Issue
Project Deprecated REAPER issue tracker
Category Arcana
Status Fixed
Priority 3
Affected Version 4.51
Closed Version 4.53
Yes votes 4
No votes 0
Assigned Users (none)
Tags (none)

09-21-2013 11:21 AM
Administrator
 
This is actually a bug in GetSetMediaItemInfo()/GetSetObjectState()/etc, where it wasn't properly updating the track-items-dirty flag, fixing (hopefully) for 4.53pre5.
Reply
09-21-2013 03:54 PM
Human being with feelings
 
Thank you for looking into this. Still broken for GetSetTrackState2() for all combinations I have tried. Undo restores many Track states, Name, Color, but not the FXCHAIN.
Reply
09-22-2013 01:38 AM
Human being with feelings
 
Ok, some progress... It looks like there is a new Undo consolidation feature being implemented.

After the FXCHAIN has been updated with GetSetTrackState2(), Reaper waits for something like "Change Track Selection" and inserts a "Close FX Chain Config" into the Undo history right before it. This is when the actual Undo state is recorded for the FXCHAIN. If "Close FX Chain Config" is not triggered, any further FXCHAIN updates are overwritten and consolidated into the same Undo state as a throttling mechanism.

Now the question is, how to trigger this "Close FX Chain Config" from Python so complete Undo points can be generated?
Reply
Reply

Issue Tools
Subscribe to this issue

All times are GMT -7. The time now is 05:55 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2017, vBulletin Solutions Inc.