[Audacity-devel] Bug in ModifyState?
A free multi-track audio editor and recorder
Brought to you by:
aosiniao
From: Markus M. <me...@me...> - 2004-01-22 12:00:19
|
Hi everyone, this is what I found when looking into Daniel James bug report (undo state not updated when changing track gain control): Actually, UndoManager::ModifyState _is_ called when the track gain control is adjusted. I have checked this by adding trace printf's into the function. But: The UndoManager doesn't know that the state has been modified when ModifyState is called! (Look at the implementation of UnsavedChanges() to see why). Obvious solution would be to explicitely add a flag which is set when ModifyState or PushState is called, but I request your comments because I'm afraid I must have understood something wrong here. There is also a second problem, which will only materialize when the problem mentioned above has been fixed: Right after a file has been loaded some function in the TrackPanel class is called to set the selection to the last value stored in the .AUP file. This already causes ModifyState to be called (it shouldn't, because no user interaction has taken place). Hence, when a call to ModifyState would (correctly) cause UnsavedChanged to return true, this would mean that right after a file has been loaded it is already marked as "modified", which is wrong. Markus |